From 81f7ff481ec10c0100d5bd0f9162ff74d317c762 Mon Sep 17 00:00:00 2001 From: Wyon Bi Date: Sat, 20 Aug 2022 10:47:53 +0000 Subject: [PATCH] mfd: max96755f: Support i2c-mux-idle-disconnect property This is used, for example, when there are several multiplexers on the same bus and the devices on the underlying buses might have same I2C addresses. Signed-off-by: Wyon Bi Change-Id: Idf2ff4dad5dabffaf7065a3f5d39cf3621b574a1 --- drivers/mfd/max96755f.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/max96755f.c b/drivers/mfd/max96755f.c index 99df4b0238d4..30a533395468 100644 --- a/drivers/mfd/max96755f.c +++ b/drivers/mfd/max96755f.c @@ -208,6 +208,7 @@ static int max96755f_i2c_probe(struct i2c_client *client) struct device_node *child; struct max96755f *max96755f; unsigned int nr = 0; + bool idle_disc; int ret; for_each_available_child_of_node(dev->of_node, child) { @@ -221,9 +222,11 @@ static int max96755f_i2c_probe(struct i2c_client *client) if (!max96755f) return -ENOMEM; + idle_disc = device_property_read_bool(dev, "i2c-mux-idle-disconnect"); + max96755f->muxc = i2c_mux_alloc(client->adapter, dev, nr, 0, - I2C_MUX_LOCKED, max96755f_select, - max96755f_deselect); + I2C_MUX_LOCKED, max96755f_select, + idle_disc ? max96755f_deselect : NULL); if (!max96755f->muxc) return -ENOMEM;