Lines Matching +full:mule +full:- +full:i2c +full:- +full:mux

1 // SPDX-License-Identifier: GPL-2.0
3 * Theobroma Systems Mule I2C device multiplexer
8 #include <linux/i2c-mux.h>
9 #include <linux/i2c.h>
25 struct mule_i2c_reg_mux *mux = muxc->priv; in mule_i2c_mux_select() local
27 return regmap_write(mux->regmap, MULE_I2C_MUX_CONFIG_REG, dev); in mule_i2c_mux_select()
46 struct device *mux_dev = &pdev->dev; in mule_i2c_mux_probe()
55 /* Count devices on the mux */ in mule_i2c_mux_probe()
56 ndev = of_get_child_count(mux_dev->of_node); in mule_i2c_mux_probe()
57 dev_dbg(mux_dev, "%d devices on the mux\n", ndev); in mule_i2c_mux_probe()
59 client = to_i2c_client(mux_dev->parent); in mule_i2c_mux_probe()
61 muxc = i2c_mux_alloc(client->adapter, mux_dev, ndev, sizeof(*priv), in mule_i2c_mux_probe()
64 return -ENOMEM; in mule_i2c_mux_probe()
68 priv->regmap = dev_get_regmap(mux_dev->parent, NULL); in mule_i2c_mux_probe()
69 if (!priv->regmap) in mule_i2c_mux_probe()
70 return dev_err_probe(mux_dev, -ENODEV, in mule_i2c_mux_probe()
71 "No parent i2c register map\n"); in mule_i2c_mux_probe()
77 * mule fw. Mule fw without mux support will accept write ops to the in mule_i2c_mux_probe()
85 ret = regmap_read(priv->regmap, MULE_I2C_MUX_CONFIG_REG, &readback); in mule_i2c_mux_probe()
95 "Failed to register mux remove\n"); in mule_i2c_mux_probe()
98 for_each_child_of_node(mux_dev->of_node, dev) { in mule_i2c_mux_probe()
109 "Mux is not supported, please update Mule FW\n"); in mule_i2c_mux_probe()
116 "Device %d not supported, please update Mule FW\n", reg); in mule_i2c_mux_probe()
131 { .compatible = "tsd,mule-i2c-mux", },
138 .name = "mule-i2c-mux",
147 MODULE_DESCRIPTION("I2C mux driver for Theobroma Systems Mule");