drm: bridge: it66121: Fix wait for DDC ready
authorPaul Cercueil <paul@crapouillou.net>
Wed, 14 Dec 2022 12:58:16 +0000 (13:58 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Fri, 16 Dec 2022 10:41:02 +0000 (11:41 +0100)
commit66bb0a7c612e0cd82ffda8c4fe42f2f404132000
tree6beef21120916435f5051f39c494ee38bff8b652
parent6ba98fd6df6536c9d59b2a6576673265864b624d
drm: bridge: it66121: Fix wait for DDC ready

The function it66121_wait_ddc_ready() would previously read the status
register until "true", which means it never actually polled anything and
would just read the register once.

Now, it will properly wait until the DDC hardware is ready or until it
reported an error.

The 'busy' variable was also renamed to 'error' since these bits are set
on error and not when the DDC hardware is busy.

Since the DDC ready function is now working properly, the msleep(20) can
be removed.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-6-paul@crapouillou.net
drivers/gpu/drm/bridge/ite-it66121.c