diff options
author | Phil Reid <preid@electromag.com.au> | 2019-06-13 12:10:23 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-06-25 14:14:26 +0200 |
commit | 6dbc6e6f58556369bf999cd7d9793586f1b0e4b4 (patch) | |
tree | ff99f350898059f9054d0c4ed9a1e92c69846cfc /scripts/dtc/util.c | |
parent | f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff) | |
download | linux-6dbc6e6f58556369bf999cd7d9793586f1b0e4b4.tar.gz linux-6dbc6e6f58556369bf999cd7d9793586f1b0e4b4.tar.bz2 linux-6dbc6e6f58556369bf999cd7d9793586f1b0e4b4.zip |
pinctrl: mcp23s08: Fix add_data and irqchip_add_nested call order
Currently probing of the mcp23s08 results in an error message
"detected irqchip that is shared with multiple gpiochips:
please fix the driver"
This is due to the following:
Call to mcp23s08_irqchip_setup() with call hierarchy:
mcp23s08_irqchip_setup()
gpiochip_irqchip_add_nested()
gpiochip_irqchip_add_key()
gpiochip_set_irq_hooks()
Call to devm_gpiochip_add_data() with call hierarchy:
devm_gpiochip_add_data()
gpiochip_add_data_with_key()
gpiochip_add_irqchip()
gpiochip_set_irq_hooks()
The gpiochip_add_irqchip() returns immediately if there isn't a irqchip
but we added a irqchip due to the previous mcp23s08_irqchip_setup()
call. So it calls gpiochip_set_irq_hooks() a second time.
Fix this by moving the call to devm_gpiochip_add_data before
the call to mcp23s08_irqchip_setup
Fixes: 02e389e63e35 ("pinctrl: mcp23s08: fix irq setup order")
Suggested-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'scripts/dtc/util.c')
0 files changed, 0 insertions, 0 deletions