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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user