Differences
This shows you the differences between the selected revision and the current version of the page.
| howto:enable_disk_leds_in_mainline_kernel 2013/02/02 12:06 | howto:enable_disk_leds_in_mainline_kernel 2017/09/06 18:38 current | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Your command is wrong. You ran echo as root, but are wriitng to the sysfs file as you (presumably a non-root user). File redirection is handled by the shell, and so you probably want to do: $ echo 4 | sudo tee /sys/class/gpio/exportThis will run tee, which will both output to stdout and to the passed in file; since it's being run as root, it'll write to the sysfs file as root.Hope this helps :) | + | It appears that blue disk leds are not blinking in mainline kernels (tried 2.6.26). To fix that, you'll need to change GPIO setting in drivers/ata/sata_mv.c: |
| + | |||
| + | <code> | ||
| + | static void mv6_enable_leds(struct mv_host_priv *hpriv, void __iomem *mmio) | ||
| + | { | ||
| + | #if 0 | ||
| + | writel(0x00000060, mmio + MV_GPIO_PORT_CTL_OFS); | ||
| + | #else | ||
| + | writel(0x00000050, mmio + MV_GPIO_PORT_CTL_OFS); | ||
| + | #endif | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | |||
| + | Code has been commited in linux-2.6 main git tree as seen here http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a88656553d18c324554855fccc730c9644048111. | ||
| + | So LED will soon be controllable from userland. **Expected in 2.6.31** | ||
| + | |||
| + | discussion with Erik Benada explaining that : | ||
| + | |||
| + | <code> | ||
| + | with conversion of Orion architecture to gpiolib it is now possible to | ||
| + | turn off power LED blinking from userspace - eg. after booting is | ||
| + | finished. You can also turn on power LED blinking before you shut down the system to let user know system is going down. | ||
| + | |||
| + | To turn off power LED blinking after booting is finished: | ||
| + | echo 1 > /sys/class/gpio/gpio3/value | ||
| + | |||
| + | To turn on power LED blinking before shutdown/reboot: | ||
| + | echo 1 > /sys/class/gpio/gpio4/value | ||
| + | </code> | ||
| + | |||
| + | Disk access leds still don't work properly in 2.6.32... | ||
| + | Following code configures SATA gpio, not ARM gpio | ||
| + | writel(0x00000050, mmio + MV_GPIO_PORT_CTL_OFS); | ||