On 29.06.2024 19:37, Guenter Roeck wrote:
Instantiating a device by calling i2c_new_client_device() assumes that theHowever i2c_new_scanned_device() runs i2c_default_probe() on the device,
device is not already instantiated. If that is not the case, it will return
an error and generate a misleading kernel log message.
i2c i2c-0: Failed to register i2c client jc42 at 0x18 (-16)
This can be reproduced by unloading the ee1004 driver and loading it again.
Avoid this by calling i2c_new_scanned_device() instead, which returns
silently if a device is already instantiated or does not exist.
whilst i2c_new_client_device() doesn't access the i2c bus.
If possible I'd like to avoid this overhead.