Skip to content

Commit 3c7a860

Browse files
anderssonrobertfoss
authored andcommitted
drm/bridge: ti-sn65dsi86: Use regmap_bulk_write API
The multi-register u16 write operation can use regmap_bulk_write() instead of two separate regmap_write() calls. It's uncertain if this has any effect on the actual updates of the underlying registers, but this at least gives the hardware the opportunity and saves us one transation on the bus. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Robert Foss <robert.foss@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20211025170925.3096444-2-bjorn.andersson@linaro.org
1 parent 3ab7b6a commit 3c7a860

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = {
193193
static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata,
194194
unsigned int reg, u16 val)
195195
{
196-
regmap_write(pdata->regmap, reg, val & 0xFF);
197-
regmap_write(pdata->regmap, reg + 1, val >> 8);
196+
u8 buf[2] = { val & 0xff, val >> 8 };
197+
198+
regmap_bulk_write(pdata->regmap, reg, buf, ARRAY_SIZE(buf));
198199
}
199200

200201
static u32 ti_sn_bridge_get_dsi_freq(struct ti_sn65dsi86 *pdata)

0 commit comments

Comments
 (0)