[mdlug] LED on Raspberry Pi
gib at juno.com
gib at juno.com
Fri Oct 10 08:20:36 EDT 2014
We have our meeting tomorrow (Saturday 10/11/2014) around Noon. If you don't get an a reply today perhaps we can talk about it then. Maybe you can backup the data you have and start over, as a fresh install.I just did some quick research and I found this:http://www.spinics.net/lists/linux-leds/msg01095.html Which says (the remainder of this reply is from the site): This API will create the sysfs node for your:
return led_classdev_register(&pdev->dev, &dummy_led_cdev);
> Any pointers on what additional steps I need to take to get my "LED" to
> show up are greatly appreciated.
>
Your dummy driver is basically right, the /sys/class/leds/dummy should
be shown up.
But you missed to register this platform device in your kernel. You
should put some code in your specific's board file, like
arch/arm/mach-omap2/board-omap3beagle.c.
Define a structure to tell kernel that you have a dummy led device.
+static struct platform_device leds_dummy_device = {
+ .name = "dummy-led",
+ .id = 0,
+};
Then register it in your board init code:
+ platform_device_register(&leds_dummy_device);
NOTE: the .name should match the name in your driver code like "dummy-led"
Then you will get the right things.
The better why is to use Device Tree instead of platform device register.
---------- Original Message ----------
From: Drew <drew4096 at gmail.com>
To: mdlug at mdlug.org
Subject: [mdlug] LED on Raspberry Pi
Date: Fri, 10 Oct 2014 00:08:14 -0400
I had the Pi's filesystem go bad on me. I managed to restore the
system along with the upgrades I had done so far, by dd-ing in the FAT
partition, putting in an ext4, then restoring from a tarball.
Only problem is, on bootup the /sys/class/leds directory, which
normally contains the "file" that controls the state of the green LED
(the one I'd been using to flash the last part of the local IP
address), isn't being created. So both the blinkIP script and the part
of the vncboot script that signals when it has the vnc server up,
aren't working.
Can someone help me figure out why? What normally creates this
directory and its contents?
_______________________________________________
mdlug mailing list
mdlug at mdlug.org
http://mdlug.org/mailman/listinfo/mdlug
____________________________________________________________
Kaiser Permanente® FEHB
A Leader in Quality Care With the Lowest Cost HMO Plan. Learn More!
http://thirdpartyoffers.juno.com/TGL3131/5437cf4951f8a4f4923cdst03vuc
More information about the mdlug
mailing list