Patch "pinctrl: mcp23s08: fix irq setup order" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
pinctrl: mcp23s08: fix irq setup order
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pinctrl-mcp23s08-fix-irq-setup-order.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
02e389e63e3523828fc3832f27e0341885f60f6fMon Sep 17 00:00:00 2001
From: Dmitry Mastykin <[email protected]>
Date: Thu, 28 Dec 2017 18:19:24 +0300
Subject: pinctrl: mcp23s08: fix irq setup order
From: Dmitry Mastykin <[email protected]>
commit 02e389e63e3523828fc3832f27e0341885f60f6f upstream.
When using mcp23s08 module with gpio-keys, often (50% of boots) it fails to get irq numbers with message:
"gpio-keys keys: Unable to get irq number for GPIO 0, error -6". Seems that irqs must be setup before devm_gpiochip_add_data().
--- drivers/pinctrl/pinctrl-mcp23s08.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/pinctrl-mcp23s08.c +4 -4
@@ -891,16 +891,16 @@ static int mcp23s08_probe_one(struct mcp goto fail; } - ret =devm_gpiochip_add_data (dev, &mcp->chip, mcp); -if (ret <0 ) - goto fail; -if (mcp->irq && mcp->irq_controller) { ret =mcp23s08_irq_setup (mcp);if (ret) goto fail; } + ret =devm_gpiochip_add_data (dev, &mcp->chip, mcp); +if (ret <0 ) + goto fail; + mcp->pinctrl_desc.name ="mcp23xxx-pinctrl" ; mcp->pinctrl_desc.pctlops = &mcp_pinctrl_ops; mcp->pinctrl_desc.confops = &mcp_pinconf_ops;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/pinctrl-mcp23s08-fix-irq-setup-order.patch