drm: bridge: it66121: Use regmap_noinc_read()

Use regmap_noinc_read() instead of reading the data from the DDC FIFO one
byte at a time.

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-4-paul@crapouillou.net
This commit is contained in:
Paul Cercueil 2022-12-14 13:58:14 +01:00
parent 334c8c1d3f
commit 315c9fb770
No known key found for this signature in database
GPG Key ID: 73EE6BD2274ABD41

View File

@ -589,13 +589,12 @@ static int it66121_get_edid_block(void *context, u8 *buf,
if (ret)
return ret;
do {
ret = regmap_read(ctx->regmap, IT66121_DDC_RD_FIFO_REG, &val);
if (ret)
return ret;
*(buf++) = val;
cnt--;
} while (cnt > 0);
ret = regmap_noinc_read(ctx->regmap, IT66121_DDC_RD_FIFO_REG,
buf, cnt);
if (ret)
return ret;
buf += cnt;
}
return 0;