mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 01:50:54 +07:00
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: 7fcac98071
("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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
68d85d0e03
commit
ad092de60f
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user