Alex, thank you for the comment. Nevertheless I didn’t get the point.
Whether you refer to this part of code. Both i2c2grp and i2c1-grp are not created there.But it was created before, otherwise there was an error during compilation time. Or am I wrong?
The first line enables i2c2. The two pinctrl entries then configure the pinmuxing of the specific pins. Normally pinctrl_i2c2 is used (default) if the bus needs to recover the pinctrl_i2c2_recovery settings are used. In the later scenario it basically configures the pins as GPIO to do the recovery.
What exactly did not work?
Do you have any error log?
Simply Stefan snippet code didn’t find the new i2c. You can try on a Colibri Evaluation Board V3 and add a new device on i2c2 bus.
I already provided my working solution.
It is correct that lines 9-11 are already included and I cut out them, thanks.