Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Dear Uwe, On Fri, Jan 15, 2016 at 5:12 PM, Uwe Kleine-Königwrote: > On 01/14/2016 04:43 PM, Roger Shimizu wrote: >>> # mount -t debugfs none /sys/kernel/debug > > For me this doesn't need to be mounted explicitly. Maybe the relevant > difference is that I'm using systemd and you don't? It's an armel box with only 128M memory. I prefer sysvinit because I use less memory. >>> # cat /sys/kernel/debug/gpio >>> GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: >>> gpio-28 (HDD0 Power ) out hi >>> gpio-29 (HDD1 Power ) out hi >>> >>> GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: >>> gpio-34 (? ) out hi >>> gpio-35 (? ) out hi >>> gpio-37 (? ) out lo >>> gpio-38 (? ) out hi >>> gpio-40 (? ) out hi > > This is the kernel where exporting works? I don't understand that one. > Is this before or after exporting the gpio to userspace? After I fixed GPIO pin in updated DT, the USB port is enabled by default. # uname -a Linux LS-WXL 3.16.0-4-kirkwood #1 Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) armv5tel GNU/Linux # cat /sys/kernel/debug/gpio GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: gpio-8 (lswxl:red:hdderr0 ) out hi gpio-28 (HDD0 Power ) out hi gpio-29 (HDD1 Power ) out hi GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: gpio-34 (lswxl:red:func ) out lo gpio-36 (lswxl:blue:func ) out hi gpio-37 (USB Power ) out hi gpio-38 (lswxl:amber:info) out hi gpio-39 (lswxl:blue:power) out hi gpio-41 (Function Button ) in hi (act lo) - IRQ edge (clear ) gpio-42 (Power-on Switch ) in lo (act hi) - IRQ edge (clear ) gpio-43 (Power-auto Switch ) in hi (act lo) - IRQ edge (clear ) gpio-46 (lswxl:red:hdderr1 ) out hi gpio-49 (lswxl:red:alarm ) out hi But result of kernel 4.x is bit differrent: # uname -a Linux LS-WXL 4.2.0-0.bpo.1-kirkwood #1 Debian 4.2.6-3~bpo8+2 (2015-12-14) armv5tel GNU/Linux # cat /sys/kernel/debug/gpio GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: gpio-8 (? ) out hi gpio-28 (HDD0 Power ) out hi gpio-29 (HDD1 Power ) out hi GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: gpio-34 (? ) out lo gpio-36 (? ) out hi gpio-37 (USB Power ) out hi gpio-38 (? ) out hi gpio-39 (? ) out hi gpio-41 (Function Button ) in hi (act lo) - IRQ edge (clear ) gpio-42 (Power-on Switch ) in lo (act hi) - IRQ edge (clear ) gpio-43 (Power-auto Switch ) in hi (act lo) - IRQ edge (clear ) gpio-46 (? ) out hi gpio-49 (? ) out hi >> After I modified DTS as above new gpio[01] pinnumber, the debug info is like: >> >> GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: >> gpio-28 (HDD0 Power ) out hi >> gpio-29 (HDD1 Power ) out hi >> >> GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: >> gpio-37 (USB Power ) out hi >> gpio-41 (Function Button ) in hi (act lo) - IRQ edge (clear ) >> gpio-42 (Power-on Switch ) in lo (act hi) - IRQ edge (clear ) >> gpio-43 (Power-auto Switch ) in hi (act lo) - IRQ edge (clear ) >> >> So gpio-37 is HIGH by default now. >> Although gpio export is still not working on previously reported >> kernel version, my problem seems get solved. > > When a gpio is in use by a driver it is normal and expected that you > cannot export it to userspace. So I'm not sure what is the remaining > problem now. Also I failed to see the commit that made the difference > for you when (quickly) looking through the differences between > 3.16.7-ckt4-3 and 3.16.7-ckt7-1. Yes, now I know it's used by other drivers such as gpio-leds driver, which is working well. For the changes in 3.16.7-ckt7-1, I guess it's related to error handling of gpio's pin. It become more strict on gpio pin error. So far, all my problems has been solved, so I'm going to close this bug report. I'll do more test on my updated DTS, and submit to upstream when I feel it's ready. Thanks for helping! Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Hello Roger, On 01/14/2016 04:43 PM, Roger Shimizu wrote: > On Thu, Jan 14, 2016 at 11:32 PM, Roger Shimizu> wrote: >> On Thu, Jan 14, 2016 at 11:08 PM, Uwe Kleine-König >> wrote: >> I need to run the following command to enable USB port on Linkstation >> LS-WXL/WSXL (armel/kirkwood with DTS [0] ): >> echo 37 >/sys/class/gpio/export >> echo out > /sys/class/gpio/gpio37/direction >> echo 1 > /sys/class/gpio/gpio37/value >>> >>> Can you post the contents of /sys/kernel/debug/gpio when the broken >>> kernel is running? >> >> Thanks for the debugging tool! >> It seems there's clue ... >> >> Here's the log for working & non-working kernel: >> >> # uname -a >> Linux LS-WXL 4.2.0-0.bpo.1-kirkwood #1 Debian 4.2.6-3~bpo8+2 >> (2015-12-14) armv5tel GNU/Linux >> # mount -t debugfs none /sys/kernel/debug For me this doesn't need to be mounted explicitly. Maybe the relevant difference is that I'm using systemd and you don't? >> # cat /sys/kernel/debug/gpio >> GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: >> gpio-28 (HDD0 Power ) out hi >> gpio-29 (HDD1 Power ) out hi >> >> GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: >> gpio-34 (? ) out hi >> gpio-35 (? ) out hi >> gpio-37 (? ) out lo >> gpio-38 (? ) out hi >> gpio-40 (? ) out hi This is the kernel where exporting works? I don't understand that one. Is this before or after exporting the gpio to userspace? >> # uname -a >> Linux LS-WXL 3.16.0-4-kirkwood #1 Debian 3.16.7-ckt7-1 (2015-03-01) >> armv5tel GNU/Linux >> # mount -t debugfs none /sys/kernel/debug >> # cat /sys/kernel/debug/gpio >> GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: >> gpio-28 (HDD0 Power ) out hi >> gpio-29 (HDD1 Power ) out hi >> >> GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: >> gpio-34 (lswxl:red:hdderr0 ) out hi >> gpio-35 (lswxl:red:hdderr1 ) out hi >> gpio-37 (lswxl:red:func ) out lo >> gpio-38 (lswxl:amber:info) out hi >> gpio-40 (lswxl:blue:power) out hi > > For above gpio-XX and it's string, I know there're gpio pin definition > errors for gpio 32-49. > Now I understand gpio 32-49 should be defined as gpio1 XX, and XX > should be real pinnumber - 32. > e.g. GPIO 37 should be defined as "gpio1 5" Yeah, when looking at the dts link you provided I wondered about the 37 in there. But not enough to mention it here. > After I modified DTS as above new gpio[01] pinnumber, the debug info is like: > > GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: > gpio-28 (HDD0 Power ) out hi > gpio-29 (HDD1 Power ) out hi > > GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: > gpio-37 (USB Power ) out hi > gpio-41 (Function Button ) in hi (act lo) - IRQ edge (clear ) > gpio-42 (Power-on Switch ) in lo (act hi) - IRQ edge (clear ) > gpio-43 (Power-auto Switch ) in hi (act lo) - IRQ edge (clear ) > > So gpio-37 is HIGH by default now. > Although gpio export is still not working on previously reported > kernel version, my problem seems get solved. When a gpio is in use by a driver it is normal and expected that you cannot export it to userspace. So I'm not sure what is the remaining problem now. Also I failed to see the commit that made the difference for you when (quickly) looking through the differences between 3.16.7-ckt4-3 and 3.16.7-ckt7-1. Best regards Uwe
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Roger Shimizuwrites: Hi, > Dear Uwe, > > On Thu, Jan 14, 2016 at 11:08 PM, Uwe Kleine-König > wrote: > I need to run the following command to enable USB port on Linkstation > LS-WXL/WSXL (armel/kirkwood with DTS [0] ): > echo 37 >/sys/class/gpio/export > echo out > /sys/class/gpio/gpio37/direction > echo 1 > /sys/class/gpio/gpio37/value >> >> Can you post the contents of /sys/kernel/debug/gpio when the broken >> kernel is running? > > Thanks for the debugging tool! > It seems there's clue ... > > Here's the log for working & non-working kernel: > > # uname -a > Linux LS-WXL 4.2.0-0.bpo.1-kirkwood #1 Debian 4.2.6-3~bpo8+2 > (2015-12-14) armv5tel GNU/Linux > # mount -t debugfs none /sys/kernel/debug > # cat /sys/kernel/debug/gpio > GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: > gpio-28 (HDD0 Power ) out hi > gpio-29 (HDD1 Power ) out hi > > GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: > gpio-34 (? ) out hi > gpio-35 (? ) out hi > gpio-37 (? ) out lo > gpio-38 (? ) out hi > gpio-40 (? ) out hi > > # uname -a > Linux LS-WXL 3.16.0-4-kirkwood #1 Debian 3.16.7-ckt7-1 (2015-03-01) > armv5tel GNU/Linux > # mount -t debugfs none /sys/kernel/debug > # cat /sys/kernel/debug/gpio > GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: > gpio-28 (HDD0 Power ) out hi > gpio-29 (HDD1 Power ) out hi > > GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: > gpio-34 (lswxl:red:hdderr0 ) out hi > gpio-35 (lswxl:red:hdderr1 ) out hi > gpio-37 (lswxl:red:func ) out lo > gpio-38 (lswxl:amber:info) out hi > gpio-40 (lswxl:blue:power) out hi >From a quick look, dts looks broken, if gpio 37 is not for the led: label = "lswxl:red:func"; gpios = < 5 GPIO_ACTIVE_LOW>; btw, this is broken too: usb_power: regulator@1 { ... gpio = < 37 GPIO_ACTIVE_HIGH>; There's no such a thing as gpio 37 on bank 0 as kirkwood bank have 32 gpios. I'm supprised nobody ever noticed it. Change it to "gpio1 5" and there are chances that export won't be needed anymore. imho, you should double check all the gpios entries in your dts. Arnaud
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Dear Amaud, On Fri, Jan 15, 2016 at 12:26 AM, Arnaud Patardwrote: > From a quick look, dts looks broken, if gpio 37 is not for the led: >label = "lswxl:red:func"; >gpios = < 5 GPIO_ACTIVE_LOW>; > > > btw, this is broken too: >usb_power: regulator@1 { > ... >gpio = < 37 GPIO_ACTIVE_HIGH>; > > There's no such a thing as gpio 37 on bank 0 as kirkwood bank have 32 > gpios. I'm supprised nobody ever noticed it. Change it to "gpio1 5" and > there are chances that export won't be needed anymore. > > imho, you should double check all the gpios entries in your dts. Yes. I found this root cause just now. Feel shame on it. I'll be more careful. Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Hello Roger, On 01/14/2016 12:22 AM, Roger Shimizu wrote: > On Thu, Jan 14, 2016 at 4:19 AM, Uwe Kleine-König >wrote: >> On 01/13/2016 02:11 PM, Roger Shimizu wrote: >>> Package: src:linux >>> Version: 3.16.7-ckt20-1+deb8u1 >>> Severity: normal >>> Control: notfound -1 3.16.7-ckt4-3 >>> Control: found -1 3.16.7-ckt7-1 >>> Control: found -1 3.16.7-ckt20-1+deb8u1 >>> Control: notfound -1 4.2.6-3~bpo8+2 >>> Control: notfound -1 4.3.3-5~bpo8+1 >>> Control: notfound -1 4.4~rc8-1~exp1 >>> >>> I need to run the following command to enable USB port on Linkstation >>> LS-WXL/WSXL (armel/kirkwood with DTS [0] ): >>> echo 37 >/sys/class/gpio/export >>> echo out > /sys/class/gpio/gpio37/direction >>> echo 1 > /sys/class/gpio/gpio37/value Can you post the contents of /sys/kernel/debug/gpio when the broken kernel is running? Best regards Uwe
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
On Thu, Jan 14, 2016 at 8:46 AM, Ben Hutchingswrote: > On Thu, 2016-01-14 at 08:22 +0900, Roger Shimizu wrote: >> Thanks for your feedback, Uwe! >> >> On Thu, Jan 14, 2016 at 4:19 AM, Uwe Kleine-König >> wrote: > [...] >> > Looking at the device tree I'd say it's correct that the gpio cannot be >> > controlled from user space because it's used to enable usb. >> >> I don't understand why it's not able to control the gpio. >> Could you please explain in detail? >> >> I'm the upstream contributor for this DTS. >> I know there may be something wrong with the gpio part, but I don't >> know how to know which part is not working. > [...] > > I think the 'gpios' property needs to be named 'gpio'. Thanks for your reply! I changed partly / all "gpios" to "gpio", only to find more errors in dmesg. Original DTS has least error, which is the best so far. Below command also proves that "gpios" property is popular: grep -r gpios arch/arm/boot/dts/ Because previous 3.16 kernel (3.16.7-ckt4-3 or before) and recent 4.2/4.3/4.4 kernel are working fine, I still consider there's a regression somewhere in 3.16-ckt7 tree. Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Dear Uwe, On Thu, Jan 14, 2016 at 11:08 PM, Uwe Kleine-Königwrote: I need to run the following command to enable USB port on Linkstation LS-WXL/WSXL (armel/kirkwood with DTS [0] ): echo 37 >/sys/class/gpio/export echo out > /sys/class/gpio/gpio37/direction echo 1 > /sys/class/gpio/gpio37/value > > Can you post the contents of /sys/kernel/debug/gpio when the broken > kernel is running? Thanks for the debugging tool! It seems there's clue ... Here's the log for working & non-working kernel: # uname -a Linux LS-WXL 4.2.0-0.bpo.1-kirkwood #1 Debian 4.2.6-3~bpo8+2 (2015-12-14) armv5tel GNU/Linux # mount -t debugfs none /sys/kernel/debug # cat /sys/kernel/debug/gpio GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: gpio-28 (HDD0 Power ) out hi gpio-29 (HDD1 Power ) out hi GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: gpio-34 (? ) out hi gpio-35 (? ) out hi gpio-37 (? ) out lo gpio-38 (? ) out hi gpio-40 (? ) out hi # uname -a Linux LS-WXL 3.16.0-4-kirkwood #1 Debian 3.16.7-ckt7-1 (2015-03-01) armv5tel GNU/Linux # mount -t debugfs none /sys/kernel/debug # cat /sys/kernel/debug/gpio GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: gpio-28 (HDD0 Power ) out hi gpio-29 (HDD1 Power ) out hi GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: gpio-34 (lswxl:red:hdderr0 ) out hi gpio-35 (lswxl:red:hdderr1 ) out hi gpio-37 (lswxl:red:func ) out lo gpio-38 (lswxl:amber:info) out hi gpio-40 (lswxl:blue:power) out hi Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
On Thu, Jan 14, 2016 at 11:32 PM, Roger Shimizuwrote: > Dear Uwe, > > On Thu, Jan 14, 2016 at 11:08 PM, Uwe Kleine-König > wrote: > I need to run the following command to enable USB port on Linkstation > LS-WXL/WSXL (armel/kirkwood with DTS [0] ): > echo 37 >/sys/class/gpio/export > echo out > /sys/class/gpio/gpio37/direction > echo 1 > /sys/class/gpio/gpio37/value >> >> Can you post the contents of /sys/kernel/debug/gpio when the broken >> kernel is running? > > Thanks for the debugging tool! > It seems there's clue ... > > Here's the log for working & non-working kernel: > > # uname -a > Linux LS-WXL 4.2.0-0.bpo.1-kirkwood #1 Debian 4.2.6-3~bpo8+2 > (2015-12-14) armv5tel GNU/Linux > # mount -t debugfs none /sys/kernel/debug > # cat /sys/kernel/debug/gpio > GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: > gpio-28 (HDD0 Power ) out hi > gpio-29 (HDD1 Power ) out hi > > GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: > gpio-34 (? ) out hi > gpio-35 (? ) out hi > gpio-37 (? ) out lo > gpio-38 (? ) out hi > gpio-40 (? ) out hi > > # uname -a > Linux LS-WXL 3.16.0-4-kirkwood #1 Debian 3.16.7-ckt7-1 (2015-03-01) > armv5tel GNU/Linux > # mount -t debugfs none /sys/kernel/debug > # cat /sys/kernel/debug/gpio > GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: > gpio-28 (HDD0 Power ) out hi > gpio-29 (HDD1 Power ) out hi > > GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: > gpio-34 (lswxl:red:hdderr0 ) out hi > gpio-35 (lswxl:red:hdderr1 ) out hi > gpio-37 (lswxl:red:func ) out lo > gpio-38 (lswxl:amber:info) out hi > gpio-40 (lswxl:blue:power) out hi For above gpio-XX and it's string, I know there're gpio pin definition errors for gpio 32-49. Now I understand gpio 32-49 should be defined as gpio1 XX, and XX should be real pinnumber - 32. e.g. GPIO 37 should be defined as "gpio1 5" After I modified DTS as above new gpio[01] pinnumber, the debug info is like: GPIOs 0-31, platform/f1010100.gpio, f1010100.gpio: gpio-28 (HDD0 Power ) out hi gpio-29 (HDD1 Power ) out hi GPIOs 32-49, platform/f1010140.gpio, f1010140.gpio: gpio-37 (USB Power ) out hi gpio-41 (Function Button ) in hi (act lo) - IRQ edge (clear ) gpio-42 (Power-on Switch ) in lo (act hi) - IRQ edge (clear ) gpio-43 (Power-auto Switch ) in hi (act lo) - IRQ edge (clear ) So gpio-37 is HIGH by default now. Although gpio export is still not working on previously reported kernel version, my problem seems get solved. Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Dear Amaud, On Fri, Jan 15, 2016 at 12:50 AM, Roger Shimizuwrote: > On Fri, Jan 15, 2016 at 12:26 AM, Arnaud Patard > wrote: >> From a quick look, dts looks broken, if gpio 37 is not for the led: >>label = "lswxl:red:func"; >>gpios = < 5 GPIO_ACTIVE_LOW>; >> >> btw, this is broken too: >>usb_power: regulator@1 { >> ... >>gpio = < 37 GPIO_ACTIVE_HIGH>; >> >> There's no such a thing as gpio 37 on bank 0 as kirkwood bank have 32 >> gpios. I'm supprised nobody ever noticed it. Change it to "gpio1 5" and >> there are chances that export won't be needed anymore. Now I think it's better to show some kinda error info when the pin doesn't exist. I'm considering to write a kernel patch. Is this limitation of "32 pin for one bank" popular with other flavour? How can I get these spec info? Thank you! Cheers, Roger
Processed: Re: Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Processing control commands: > notfound -1 3.16.7-ckt4-3 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set > found -1 3.16.7-ckt7-1 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set > found -1 3.16.7-ckt20-1+deb8u1 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set > notfound -1 4.2.6-3~bpo8+2 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set > notfound -1 4.3.3-5~bpo8+1 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set > notfound -1 4.4~rc8-1~exp1 Bug #810894 [src:linux] src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL Ignoring request to alter found versions of bug #810894 to the same values previously set -- 810894: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810894 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Package: src:linux Version: 3.16.7-ckt20-1+deb8u1 Severity: normal Control: notfound -1 3.16.7-ckt4-3 Control: found -1 3.16.7-ckt7-1 Control: found -1 3.16.7-ckt20-1+deb8u1 Control: notfound -1 4.2.6-3~bpo8+2 Control: notfound -1 4.3.3-5~bpo8+1 Control: notfound -1 4.4~rc8-1~exp1 X-Debbugs-Cc: debian-...@lists.debian.org Dear Maintainer, I need to run the following command to enable USB port on Linkstation LS-WXL/WSXL (armel/kirkwood with DTS [0] ): echo 37 >/sys/class/gpio/export echo out > /sys/class/gpio/gpio37/direction echo 1 > /sys/class/gpio/gpio37/value The 3-line script runs well on Jessie rootfs + kernel listed below: - 3.16.7-ckt4-3 - 4.2.6-3~bpo8+2 - 4.4~rc8-1~exp1 But fails from 3.16.7-ckt7-1 to 3.16.7-ckt20-1+deb8u1 (latest jessie kernel). The error message is like this: # echo 37 >/sys/class/gpio/export -bash: echo: write error: Device or resource busy I believe it's a regression between 3.16.7-ckt4-3 and 3.16.7-ckt7-1. I see the kernel config keeps the same for above two version, so it's only related to source code change. I wonder whether other armel/kirkwood user meet similar issue. Enclosed the dmesg log for kernel 3.16.7-ckt4-3 and 3.16.7-ckt7-1. I found some suspicious part as following. # grep -i gpio dmesg_3.16.7-ckt4-3_USB-OK [1.330575] platform gpio_leds: Driver leds-gpio requests probe deferral [1.375088] platform gpio_leds: Driver leds-gpio requests probe deferral [1.939806] platform gpio_leds: Driver leds-gpio requests probe deferral [2.018299] platform gpio_leds: Driver leds-gpio requests probe deferral [2.111944] platform gpio_leds: Driver leds-gpio requests probe deferral [2.224434] platform gpio_leds: Driver leds-gpio requests probe deferral [3.089576] platform gpio_leds: Driver leds-gpio requests probe deferral [6.368688] + [ -z of:NgpioTCmarvell,orion-gpio ] [6.375236] + printf %.1s of:NgpioTCmarvell,orion-gpio [6.387131] + modprobe of:NgpioTCmarvell,orion-gpio [6.435552] + [ -z of:NgpioTCmarvell,orion-gpio ] [6.442104] + printf %.1s of:NgpioTCmarvell,orion-gpio [6.453970] + modprobe of:NgpioTCmarvell,orion-gpio [ 12.451230] platform gpio_keys: Driver gpio-keys requests probe deferral [ 12.702214] platform gpio_leds: Driver leds-gpio requests probe deferral [ 12.797363] platform gpio_keys: Driver gpio-keys requests probe deferral [ 13.901732] platform gpio_leds: Driver leds-gpio requests probe deferral [ 13.941971] platform gpio_keys: Driver gpio-keys requests probe deferral [ 14.010529] platform gpio_leds: Driver leds-gpio requests probe deferral [ 14.028970] platform gpio_keys: Driver gpio-keys requests probe deferral # grep -i gpio dmesg_3.16.7-ckt7-1_USB-NG [1.330434] leds-gpio gpio_leds: Skipping unavailable LED gpio -22 (lswxl:blue:func) [1.338206] leds-gpio gpio_leds: Skipping unavailable LED gpio -22 (lswxl:red:alarm) [6.170632] + [ -z of:NgpioTCmarvell,orion-gpio ] [6.177167] + printf %.1s of:NgpioTCmarvell,orion-gpio [6.189050] + modprobe of:NgpioTCmarvell,orion-gpio [6.237266] + [ -z of:NgpioTCmarvell,orion-gpio ] [6.243743] + printf %.1s of:NgpioTCmarvell,orion-gpio [6.255639] + modprobe of:NgpioTCmarvell,orion-gpio [ 12.246044] gpio-keys gpio_keys: Failed to get gpio flags, error: -22 [ 12.281961] gpio-keys: probe of gpio_keys failed with error -22 [0]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/kirkwood-lswxl.dts Cheers, Roger dmesg_LS-WXL_USB-issue.tar.gz Description: GNU Zip compressed data
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Hello Roger, On 01/13/2016 02:11 PM, Roger Shimizu wrote: > Package: src:linux > Version: 3.16.7-ckt20-1+deb8u1 > Severity: normal > Control: notfound -1 3.16.7-ckt4-3 > Control: found -1 3.16.7-ckt7-1 > Control: found -1 3.16.7-ckt20-1+deb8u1 > Control: notfound -1 4.2.6-3~bpo8+2 > Control: notfound -1 4.3.3-5~bpo8+1 > Control: notfound -1 4.4~rc8-1~exp1 > > I need to run the following command to enable USB port on Linkstation > LS-WXL/WSXL (armel/kirkwood with DTS [0] ): > echo 37 >/sys/class/gpio/export > echo out > /sys/class/gpio/gpio37/direction > echo 1 > /sys/class/gpio/gpio37/value Side note: you can shorten that to: echo 37 > /sys/class/gpio/export echo high > /sys/class/gpio/gpio37/direction > The 3-line script runs well on Jessie rootfs + kernel listed below: > - 3.16.7-ckt4-3 > - 4.2.6-3~bpo8+2 > - 4.4~rc8-1~exp1 > But fails from 3.16.7-ckt7-1 to 3.16.7-ckt20-1+deb8u1 (latest jessie kernel). > > The error message is like this: > # echo 37 >/sys/class/gpio/export > -bash: echo: write error: Device or resource busy Looking at the device tree I'd say it's correct that the gpio cannot be controlled from user space because it's used to enable usb. A quick look at the provided dmesg for 3.16.7-ckt7-1 makes me expect that usb works there without the gpio commands above? If so there is no bug, right? Best regards Uwe
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
Thanks for your feedback, Uwe! On Thu, Jan 14, 2016 at 4:19 AM, Uwe Kleine-Königwrote: > Hello Roger, > > On 01/13/2016 02:11 PM, Roger Shimizu wrote: >> Package: src:linux >> Version: 3.16.7-ckt20-1+deb8u1 >> Severity: normal >> Control: notfound -1 3.16.7-ckt4-3 >> Control: found -1 3.16.7-ckt7-1 >> Control: found -1 3.16.7-ckt20-1+deb8u1 >> Control: notfound -1 4.2.6-3~bpo8+2 >> Control: notfound -1 4.3.3-5~bpo8+1 >> Control: notfound -1 4.4~rc8-1~exp1 >> >> I need to run the following command to enable USB port on Linkstation >> LS-WXL/WSXL (armel/kirkwood with DTS [0] ): >> echo 37 >/sys/class/gpio/export >> echo out > /sys/class/gpio/gpio37/direction >> echo 1 > /sys/class/gpio/gpio37/value > > Side note: you can shorten that to: > > echo 37 > /sys/class/gpio/export > echo high > /sys/class/gpio/gpio37/direction Learned new tips. Thank you! >> The 3-line script runs well on Jessie rootfs + kernel listed below: >> - 3.16.7-ckt4-3 >> - 4.2.6-3~bpo8+2 >> - 4.4~rc8-1~exp1 >> But fails from 3.16.7-ckt7-1 to 3.16.7-ckt20-1+deb8u1 (latest jessie kernel). >> >> The error message is like this: >> # echo 37 >/sys/class/gpio/export >> -bash: echo: write error: Device or resource busy > > Looking at the device tree I'd say it's correct that the gpio cannot be > controlled from user space because it's used to enable usb. I don't understand why it's not able to control the gpio. Could you please explain in detail? I'm the upstream contributor for this DTS. I know there may be something wrong with the gpio part, but I don't know how to know which part is not working. > A quick look at the provided dmesg for 3.16.7-ckt7-1 makes me expect > that usb works there without the gpio commands above? If so there is no > bug, right? Yes, dmesg shows USB is recognized. But actually it's not working until user land's gpio export and setting. If gpio export fails, the USB won't work at all. I guess the gpio pin is to set whether to give USB power. Cheers, Roger
Bug#810894: src:linux: GPIO probe failure on Linkstation LS-WXL/WSXL
On Thu, 2016-01-14 at 08:22 +0900, Roger Shimizu wrote: > Thanks for your feedback, Uwe! > > On Thu, Jan 14, 2016 at 4:19 AM, Uwe Kleine-König >wrote: [...] > > Looking at the device tree I'd say it's correct that the gpio cannot be > > controlled from user space because it's used to enable usb. > > I don't understand why it's not able to control the gpio. > Could you please explain in detail? > > I'm the upstream contributor for this DTS. > I know there may be something wrong with the gpio part, but I don't > know how to know which part is not working. [...] I think the 'gpios' property needs to be named 'gpio'. Ben. -- Ben Hutchings Unix is many things to many people, but it's never been everything to anybody. signature.asc Description: This is a digitally signed message part