#9362 closed defect (fixed)
gpioctl doesn't work on bcm63xx - livebox
Reported by: | danitool <dgcbueu@…> | Owned by: | developers |
---|---|---|---|
Priority: | normal | Milestone: | Barrier Breaker 14.07 |
Component: | kernel | Version: | Trunk |
Keywords: | gpio bcm63xx livebox | Cc: |
Description
Board livebox bcm63xx.
root@OpenWrt:/# gpioctl clear 1 using gpio pin 1 root@OpenWrt:/# gpioctl get 1 using gpio pin 1 Pin 1 is HIGH
And all gpios are set high always.
I'm using this patch for the board
170-board_livebox.patch
Attachments (1)
Change History (10)
Changed 7 years ago by danitool <dgcbueu@…>
comment:1 Changed 7 years ago by florian
comment:2 Changed 7 years ago by danitool <dgcbueu@…>
I don't have anything to control or monitor at /sys/class/gpio
root@OpenWrt:/# ls -l /sys/class/gpio --w------- 1 root root 4096 Jan 1 00:00 export lrwxrwxrwx 1 root root 0 Jan 1 00:00 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0 --w------- 1 root root 4096 Jan 1 00:00 unexport
But I have the leds at /sys/class/leds/ and I can set them high or low with brightness.
root@OpenWrt:/# ls -l /sys/class/leds/ lrwxrwxrwx 1 root root 0 Jan 1 00:00 adsl -> ../../devices/platform/leds-gpio.0/leds/adsl lrwxrwxrwx 1 root root 0 Jan 1 00:00 adsl-fail -> ../../devices/platform/leds-gpio.0/leds/adsl-fail lrwxrwxrwx 1 root root 0 Jan 1 00:02 b43-phy0::radio -> ../../devices/pci0000:00/0000:00:01.0/ssb0:0/leds/b43-phy0::radio lrwxrwxrwx 1 root root 0 Jan 1 00:02 b43-phy0::rx -> ../../devices/pci0000:00/0000:00:01.0/ssb0:0/leds/b43-phy0::rx lrwxrwxrwx 1 root root 0 Jan 1 00:02 b43-phy0::tx -> ../../devices/pci0000:00/0000:00:01.0/ssb0:0/leds/b43-phy0::tx lrwxrwxrwx 1 root root 0 Jan 1 00:00 phone -> ../../devices/platform/leds-gpio.0/leds/phone lrwxrwxrwx 1 root root 0 Jan 1 00:00 traffic -> ../../devices/platform/leds-gpio.0/leds/traffic lrwxrwxrwx 1 root root 0 Jan 1 00:00 wifi -> ../../devices/platform/leds-gpio.0/leds/wifi
I still don't know where are the buttons for monitoring their status...
comment:3 Changed 7 years ago by florian
Just export gpios like this:
echo 1 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio1/direction echo 0 > /sys/class/gpio/gpio1/value
comment:4 Changed 7 years ago by danitool <dgcbueu@…>
It didn't work in latest trunk
root@OpenWrt:/# echo 1 > /sys/class/gpio/export root@OpenWrt:/# ls -l /sys/class/gpio/ --w------- 1 root root 4096 Jan 1 00:05 export lrwxrwxrwx 1 root root 0 Jan 1 00:02 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0 --w------- 1 root root 4096 Jan 1 00:02 unexport root@OpenWrt:/# echo out > /sys/class/gpio/gpio1/direction /bin/ash: can't create /sys/class/gpio/gpio1/direction: nonexistent directory root@OpenWrt:/#
No gpioX is created when I set any gpio in the /sys/class/gpio/export
comment:5 Changed 7 years ago by danitool <dgcbueu@…>
well, it works with the non-defined leds
gpio 0, 1, 2, 3, 4 are leds, with this gpio the exporting doesn't work
but exporting gpio5 creates /sys/class/gpio/gpio5
...
comment:6 Changed 7 years ago by danitool <dgcbueu@…>
... neither I can export gpio buttons.
Then the exporting isn't useful with defined leds and buttons.
comment:7 Changed 7 years ago by danitool <dgcbueu@…>
Ok, gpioctl working again in latest trunk r27604.
Mark it as solved
comment:8 Changed 7 years ago by florian
- Resolution set to fixed
- Status changed from new to closed
comment:9 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
gpioctl is not the right way to do that, please use /sys/class/gpio instead.