[PATCH v7 2/8] i2c: muxes: add support for tsd,mule-i2c multiplexer
Farouk Bouabid
farouk.bouabid at cherry.de
Wed Sep 4 01:35:33 PDT 2024
Hi Andi,
On 03.09.24 17:13, Andi Shyti wrote:
[...]
>> + /* Create device adapters */
>> + for_each_child_of_node(mux_dev->of_node, dev) {
>> + u32 reg;
>> +
>> + ret = of_property_read_u32(dev, "reg", ®);
>> + if (ret)
>> + return dev_err_probe(mux_dev, ret,
>> + "No reg property found for %s\n",
>> + of_node_full_name(dev));
>> +
>> + if (old_fw && reg != 0) {
>> + dev_warn(mux_dev,
>> + "Mux is not supported, please update Mule FW\n");
>> + continue;
>> + }
>> +
>> + ret = mux_select(muxc, reg);
>> + if (ret) {
>> + dev_warn(mux_dev,
>> + "Device %d not supported, please update Mule FW\n", reg);
>> + continue;
>> + }
>> +
>> + ret = i2c_mux_add_adapter(muxc, 0, reg);
>> + if (ret)
>> + return ret;
> do we need to delete the adapters we added in previous cycles?
>
We calldevm_action_or_reset() before the loop to add adapter-removal to
the error path. I think that does the job
for us or am I missing something ?
Thanks,
Farouk
More information about the Linux-rockchip
mailing list