diff options
Diffstat (limited to 'drivers/i2c/i2c-mux.c')
| -rw-r--r-- | drivers/i2c/i2c-mux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index fda72e8be885..6018f196d0fd 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -333,8 +333,13 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, if (muxc->dev->of_node) { struct device_node *dev_node = muxc->dev->of_node; struct device_node *mux_node, *child = NULL; + u32 base_nr = 0; u32 reg; + of_property_read_u32(dev_node, "base-nr", &base_nr); + if (!force_nr && base_nr) + force_nr = base_nr + chan_id; + if (muxc->arbitrator) mux_node = of_get_child_by_name(dev_node, "i2c-arb"); else if (muxc->gate) |
