Re: pinctrl: mcp23s08: gpio-keys: Unable to get irq number for GPIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux