Skip to content

Commit ad092de

Browse files
Alex HemmeWolfram Sang
authored andcommitted
i2c: i2c-mux-pca954x: fix deselect enabling for device-tree
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]>
1 parent 68d85d0 commit ad092de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/muxes/i2c-mux-pca954x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ static int pca954x_probe(struct i2c_client *client,
268268
/* discard unconfigured channels */
269269
break;
270270
idle_disconnect_pd = pdata->modes[num].deselect_on_exit;
271-
data->deselect |= (idle_disconnect_pd
272-
|| idle_disconnect_dt) << num;
273271
}
272+
data->deselect |= (idle_disconnect_pd ||
273+
idle_disconnect_dt) << num;
274274

275275
ret = i2c_mux_add_adapter(muxc, force, num, class);
276276

0 commit comments

Comments
 (0)