www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

GPIO and Alix leds again

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
PatrickB



Joined: 03 Nov 2012
Posts: 46

PostPosted: Thu Mar 12, 2015 8:36 pm    Post subject: GPIO and Alix leds again Reply with quote

Good evening.

root@alixbox> ll /sys/class/gpio
total 0
--w------- 1 root root 4.0K Mar 1 11:32 export
--w------- 1 root root 4.0K Mar 1 11:32 unexport

When that exists, then it should be quite simple:

echo "27" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio27/direction
echo "1" > /sys/class/gpio/gpio27/value

The reality:

root@alixbox> echo "27" > /sys/class/gpio/export
bash: echo: write error: No such device

Idem with any other GPIO # (the leds are at 6, 25 and 27).

Any idea ? Did someone play with the GPIO ?

Thanks, best regards
Back to top
View user's profile Send private message
PatrickB



Joined: 03 Nov 2012
Posts: 46

PostPosted: Mon Mar 23, 2015 5:54 pm    Post subject: Reply with quote

Hello.

It does not work better when done from the Pre/Post-Boot script Sad

Modules missing ?

X-ref: http://www.zeroshell.org/forum/viewtopic.php?p=14001

Any idea welcome.

Thanks, Best regards.
Back to top
View user's profile Send private message
PatrickB



Joined: 03 Nov 2012
Posts: 46

PostPosted: Sun Apr 05, 2015 5:15 pm    Post subject: Missing the driver for the GPIO ??? Reply with quote

Hello.

Still the headache...

All the needed stuff looks to be in place:

>lsmod
...
leds_gpio 1730 0

> ll /sys/devices/platform
total 0
...
drwxr-xr-x 2 root root 0 Apr 3 2015 leds-gpio

> ll /sys/devices/platform/leds-gpio
total 0
-r--r--r-- 1 root root 4.0K Apr 3 21:10 modalias
lrwxrwxrwx 1 root root 0 Apr 3 2015 subsystem -> ../../../bus/platform
-rw-r--r-- 1 root root 4.0K Apr 3 2015 uevent

BUT:

> cat /cdrom/usr/src/.config |more
...
# CONFIG_MFD_CS5535 is not set
...
#
# LED drivers
#
CONFIG_LEDS_LM3530=m
CONFIG_LEDS_NET48XX=m
CONFIG_LEDS_WRAP=m
CONFIG_LEDS_PCA9532=m
CONFIG_LEDS_PCA9532_GPIO=y
CONFIG_LEDS_GPIO=m
CONFIG_LEDS_LP3944=m
CONFIG_LEDS_LP5521=m
CONFIG_LEDS_LP5523=m
# CONFIG_LEDS_CLEVO_MAIL is not set
CONFIG_LEDS_PCA955X=m
CONFIG_LEDS_PCA9633=m
CONFIG_LEDS_BD2802=m
CONFIG_LEDS_INTEL_SS4200=m
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_TCA6507=m
CONFIG_LEDS_OT200=m
CONFIG_LEDS_TRIGGERS=y

#
# LED Triggers
#
CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
CONFIG_LEDS_TRIGGER_GPIO=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
...


>modprobe -l
...
kernel/drivers/leds/trigger/ledtrig-timer.ko
kernel/drivers/leds/trigger/ledtrig-oneshot.ko
kernel/drivers/leds/trigger/ledtrig-heartbeat.ko
kernel/drivers/leds/trigger/ledtrig-backlight.ko
kernel/drivers/leds/trigger/ledtrig-gpio.ko
kernel/drivers/leds/trigger/ledtrig-default-on.ko
kernel/drivers/leds/trigger/ledtrig-transient.ko
kernel/drivers/leds/trigger/ledtrig-camera.ko
kernel/drivers/leds/leds-bd2802.ko
kernel/drivers/leds/leds-lm3530.ko
kernel/drivers/leds/leds-lm3642.ko
kernel/drivers/leds/leds-net48xx.ko
kernel/drivers/leds/leds-wrap.ko
kernel/drivers/leds/leds-pca9532.ko
kernel/drivers/leds/leds-gpio.ko
kernel/drivers/leds/leds-lp3944.ko
kernel/drivers/leds/leds-lp55xx-common.ko
kernel/drivers/leds/leds-lp5521.ko
kernel/drivers/leds/leds-lp5523.ko
kernel/drivers/leds/leds-lp5562.ko
kernel/drivers/leds/leds-lp8501.ko
kernel/drivers/leds/leds-tca6507.ko
kernel/drivers/leds/leds-ot200.ko
kernel/drivers/leds/leds-pca955x.ko
kernel/drivers/leds/leds-pca963x.ko
kernel/drivers/leds/leds-pca9685.ko
kernel/drivers/leds/leds-ss4200.ko
kernel/drivers/leds/leds-lt3593.ko
kernel/drivers/leds/leds-lm355x.ko
kernel/drivers/leds/leds-blinkm.ko
...

Well, visibly we must have all ready for other platforms,
...but there is no ???-cs5535.ko present in both the /gpio/ and /leds/ sections, bad luck for the Alix Crying or Very sad

> echo "27" > /sys/class/gpio/export
bash: echo: write error: No such device

I tried to encrust the one from this package:
kmod-cs5535_3.10.49-1_x86.ipk from:
https://downloads.openwrt.org/barrier_breaker/14.07/x86/alix2/packages/base/

But the binary is not compatible (desperate attempt) Evil or Very Mad

=> I see no other solution than a kernel recompiled with the driver for the Alix available as a module.

Any other idea ?

Thanks, Best regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group