Skip to content

Commit

Permalink
i2c: i2c-mux-pca954x: fix deselect enabling for device-tree
Browse files Browse the repository at this point in the history
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: 7fcac98 ("i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core")
Cc: <[email protected]> # v4.7+
Signed-off-by: Alex Hemme <[email protected]>
Signed-off-by: Ziyang Wu <[email protected]>
[touched up a few minor issues /peda]
Signed-off-by: Peter Rosin <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
Alex Hemme authored and Wolfram Sang committed Nov 19, 2016
1 parent 68d85d0 commit ad092de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/muxes/i2c-mux-pca954x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ad092de

Please sign in to comment.