* [PATCH] i2c: i2c-mux-pca954x: fix deselect enabling for device-tree
@ 2016-11-19 9:48 Peter Rosin
2016-11-19 20:49 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Peter Rosin @ 2016-11-19 9:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alex Hemme, Wolfram Sang, Wolfram Sang, MakeB, linux-i2c, stable,
Ziyang Wu, Peter Rosin
From: Alex Hemme <ahemme@cisco.com>
Deselect functionality can be ignored for device-trees with
"i2c-mux-idle-disconnect" entries if no platform_data is available.
By enabling the deselect functionality outside the platform_data
block the logic works as it did in previous kernels.
Fixes: 7fcac9807175 ("i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core")
Cc: <stable@vger.kernel.org> # v4.7+
Signed-off-by: Alex Hemme <ahemme@cisco.com>
Signed-off-by: Ziyang Wu <ziywu@cisco.com>
[touched up a few minor issues /peda]
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/i2c/muxes/i2c-mux-pca954x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Hi!
I got this regression report and patch off-list, and am now
feeding it on to the appropriate places.
I would like to thank Alex (and team?) for finding the bug and
providing a fix for the bug that I introduced.
Cheers,
Peter
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 1091346f2480..8bc3d36d2837 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -268,9 +268,9 @@ static int pca954x_probe(struct i2c_client *client,
/* discard unconfigured channels */
break;
idle_disconnect_pd = pdata->modes[num].deselect_on_exit;
- data->deselect |= (idle_disconnect_pd
- || idle_disconnect_dt) << num;
}
+ data->deselect |= (idle_disconnect_pd ||
+ idle_disconnect_dt) << num;
ret = i2c_mux_add_adapter(muxc, force, num, class);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: i2c-mux-pca954x: fix deselect enabling for device-tree
2016-11-19 9:48 [PATCH] i2c: i2c-mux-pca954x: fix deselect enabling for device-tree Peter Rosin
@ 2016-11-19 20:49 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-11-19 20:49 UTC (permalink / raw)
To: Peter Rosin
Cc: linux-kernel, Alex Hemme, Wolfram Sang, MakeB, linux-i2c, stable,
Ziyang Wu
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
On Sat, Nov 19, 2016 at 10:48:38AM +0100, Peter Rosin wrote:
> From: Alex Hemme <ahemme@cisco.com>
>
> Deselect functionality can be ignored for device-trees with
> "i2c-mux-idle-disconnect" entries if no platform_data is available.
> By enabling the deselect functionality outside the platform_data
> block the logic works as it did in previous kernels.
>
> Fixes: 7fcac9807175 ("i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core")
> Cc: <stable@vger.kernel.org> # v4.7+
> Signed-off-by: Alex Hemme <ahemme@cisco.com>
> Signed-off-by: Ziyang Wu <ziywu@cisco.com>
> [touched up a few minor issues /peda]
> Signed-off-by: Peter Rosin <peda@axentia.se>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-19 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 9:48 [PATCH] i2c: i2c-mux-pca954x: fix deselect enabling for device-tree Peter Rosin
2016-11-19 20:49 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).