* pinctrl: mcp23s08: gpio-keys: Unable to get irq number for GPIO
@ 2017-12-20 14:44 Dmitry Mastykin
2017-12-21 3:20 ` Phil Reid
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Mastykin @ 2017-12-20 14:44 UTC (permalink / raw)
To: linux-gpio, Phil Reid
Hello,
when using gpio-keys with mcp23s08, sometimes it fails to get irq numbers:
[ 10.236393] gpiochip_setup_dev: registered GPIOs 504 to 511 on
device: gpiochip4 (mcp23008)
[ 10.242995] of_get_named_gpiod_flags: parsed 'gpios' property of
node '/keys/button@1[0]' - status (0)
[ 10.243759] gpio-keys keys: Unable to get irq number for GPIO 0, error -6
but more often it succeeds (approx. 1:3):
[ 10.702204] gpiochip_setup_dev: registered GPIOs 504 to 511 on
device: gpiochip4 (mcp23008)
[ 10.731450] of_get_named_gpiod_flags: parsed 'gpios' property of
node '/keys/button@1[0]' - status (0)
[ 10.803577] of_get_named_gpiod_flags: parsed 'gpios' property of
node '/keys/button@2[0]' - status (0)
[ 10.869131] of_get_named_gpiod_flags: parsed 'gpios' property of
node '/keys/button@3[0]' - status (0)
[ 10.928949] of_get_named_gpiod_flags: parsed 'gpios' property of
node '/keys/button@4[0]' - status (0)
Please suggest where could be the problem.
Thank you!
Dmitry Mastykin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: pinctrl: mcp23s08: gpio-keys: Unable to get irq number for GPIO
2017-12-20 14:44 pinctrl: mcp23s08: gpio-keys: Unable to get irq number for GPIO Dmitry Mastykin
@ 2017-12-21 3:20 ` Phil Reid
0 siblings, 0 replies; 2+ messages in thread
From: Phil Reid @ 2017-12-21 3:20 UTC (permalink / raw)
To: Dmitry Mastykin, linux-gpio
G'day Dmitry,
On 20/12/2017 22:44, Dmitry Mastykin wrote:
> Hello,
>
> when using gpio-keys with mcp23s08, sometimes it fails to get irq numbers:
>
> [ 10.236393] gpiochip_setup_dev: registered GPIOs 504 to 511 on
> device: gpiochip4 (mcp23008)
> [ 10.242995] of_get_named_gpiod_flags: parsed 'gpios' property of
> node '/keys/button@1[0]' - status (0)
> [ 10.243759] gpio-keys keys: Unable to get irq number for GPIO 0, error -6
>
> but more often it succeeds (approx. 1:3):
>
> [ 10.702204] gpiochip_setup_dev: registered GPIOs 504 to 511 on
> device: gpiochip4 (mcp23008)
> [ 10.731450] of_get_named_gpiod_flags: parsed 'gpios' property of
> node '/keys/button@1[0]' - status (0)
> [ 10.803577] of_get_named_gpiod_flags: parsed 'gpios' property of
> node '/keys/button@2[0]' - status (0)
> [ 10.869131] of_get_named_gpiod_flags: parsed 'gpios' property of
> node '/keys/button@3[0]' - status (0)
> [ 10.928949] of_get_named_gpiod_flags: parsed 'gpios' property of
> node '/keys/button@4[0]' - status (0)
>
> Please suggest where could be the problem.
I have a pretty similar use mcp deive (serial 16bit) being used for gpio keypad.
Haven't seen any issues as yet.
Is the mcp irq setup succeeding, maybe add a log message to mcp23s08_irq_setup()
Maybe probe order related and on defer something is not getting cleaned up correctly?
One difference is:
mcp230xx_probe calls i2c_set_clientdata after mcp23s08_probe_one
mcp23s08_probe calls spi_set_drvdata before mcp23s08_probe_one
--
Regards
Phil Reid
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-21 3:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-20 14:44 pinctrl: mcp23s08: gpio-keys: Unable to get irq number for GPIO Dmitry Mastykin
2017-12-21 3:20 ` Phil Reid
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.