[PATCH v2] i2c: mux: Fix the crash when the i2c-arbitrator node is present
Heiko Schocher
hs at denx.de
Tue Jun 24 08:21:18 CEST 2025
Hi Michal,
On 24.06.25 08:03, Michal Simek wrote:
>
>
> On 6/24/25 05:43, Heiko Schocher wrote:
>> Hello Venkatesh Yadav Abbarapu,
>>
>> On 23.06.25 10:06, Venkatesh Yadav Abbarapu wrote:
>>> Observing the crash when we add the i2c-arbitrator node in the device
>>> tree as per the DT bindings. The issue is with the child node of
>>> i2c-arbitrator at 72 i.e., i2c at f1950000->i2c-arbitrator at 72->i2c-arb, as the
>>> arbitrator uses the uclass of mux(UCLASS_I2C_MUX) and the mux uclass driver
>>> checks for the "reg" property using the i2c_mux_child_post_bind() function,
>>> if it won't find the "reg" property it will return -EINVAL which is leading
>>> to the crash.
>>> So, add the logic to check whether the child node has the "reg" property,
>>> if the "reg" property exists then read the "reg" and update the channel.
>>>
>>> https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/i2c-arb.txt
>>>
>>> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
>>> ---
>>> Changes in v2:
>>> - Return immediately if "reg" property is missing for arbitrator case.
>>> ---
>>> drivers/i2c/muxes/i2c-mux-uclass.c | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>
>> Reviewed-by: Heiko Schocher <hs at denx.de>
>>
>> @Tom: The fix looks valid for me, but I am unsure if it is not to
>> late for 2025.07. What do you think?
>
> No issue to take it to next release. Issue is visible with pca9541 which has been sent too but won't
> make to 2025.07 anyway.
@Tom: May you can pick it up without a formal pull request?
Thanks!
bye,
Heiko
>
> Thanks,
> Michal
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list