]> git.baikalelectronics.ru Git - kernel.git/commit
drm: adv7511: override i2c address of cec before accessing it
authorAntonio Borneo <antonio.borneo@foss.st.com>
Tue, 7 Jun 2022 21:31:44 +0000 (23:31 +0200)
committerRobert Foss <robert.foss@linaro.org>
Fri, 10 Jun 2022 08:11:14 +0000 (10:11 +0200)
commitd3bb8eab7fff8d7a8cef4bd08229b43551688e02
tree4e93e153ca915c8a19624b37b3c0f09c3b19063f
parent6b5c0a698067ab45b788fc4197c8fa7cfaee5cd6
drm: adv7511: override i2c address of cec before accessing it

Commit dbbe6a773cf0 ("drm: adv7511: Add support for
i2c_new_secondary_device") allows a device tree node to override
the default addresses of the secondary i2c devices. This is useful
for solving address conflicts on the i2c bus.

In adv7511_init_cec_regmap() the new i2c address of cec device is
read from device tree and immediately accessed, well before it is
written in the proper register to override the default address.
This can cause an i2c error during probe and a consequent probe
failure.

Once the new i2c address is read from the device tree, override
the default address before any attempt to access the cec.

Tested with adv7533 and stm32mp157f.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Fixes: dbbe6a773cf0 ("drm: adv7511: Add support for i2c_new_secondary_device")
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220607213144.427177-1-antonio.borneo@foss.st.com
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c