GPIO and Alix leds again

Home Page Forums Network Management ZeroShell GPIO and Alix leds again

This topic contains 1 reply, has 0 voices, and was last updated by  PatrickB 3 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44238

    PatrickB
    Member

    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

    #53760

    PatrickB
    Member

    Hello.

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

    Modules missing ?

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

    Any idea welcome.

    Thanks, Best regards.

    #53761

    PatrickB
    Member

    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 😥

    > 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) 👿

    => 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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.