drm/bridge: it6505: Add range and selector_reg
authorHsin-Yi Wang <hsinyi@chromium.org>
Mon, 27 Mar 2023 04:48:05 +0000 (12:48 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 27 Mar 2023 09:53:39 +0000 (11:53 +0200)
commit1a2dbf0303e8793444a57a2eec0c6b29523657d9
tree45f29bd950d2628a492b1764fc2b2a7dc365b43a
parent4334aec07a62e3b1afdf54f63dca757e4ce9518c
drm/bridge: it6505: Add range and selector_reg

There are 2 banks on it6505, and when writing to different bank,
REG_BANK_SEL needs to be set to the targeted bank. The current code set
this additionally, which causes a race condition when a process is
writing bank 0 registers while another process set the bank to 1. Set
ranges in regmap config so the regmap API would handle the bank changes.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230327044804.3657551-1-hsinyi@chromium.org
drivers/gpu/drm/bridge/ite-it6505.c