diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-10-25 20:09:24 +0300 |
---|---|---|
committer | Robert Foss <robert.foss@linaro.org> | 2021-10-27 18:02:33 +0300 |
commit | 3c7a8600dec9858da9e76adb622d161f27652b00 (patch) | |
tree | 8f1d7a1cc0ed130287e61015fce8449cd8d2e9f6 /drivers/gpu/drm/bridge/ti-sn65dsi86.c | |
parent | 3ab7b6ac5d829e60c3b89d415811ff1c9f358c8e (diff) | |
download | linux-3c7a8600dec9858da9e76adb622d161f27652b00.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/bridge/ti-sn65dsi86.c')
-rw-r--r-- | drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 6154bed0af5b..5b59d8dd3acd 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -193,8 +193,9 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = { static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata, unsigned int reg, u16 val) { - regmap_write(pdata->regmap, reg, val & 0xFF); - regmap_write(pdata->regmap, reg + 1, val >> 8); + u8 buf[2] = { val & 0xff, val >> 8 }; + + regmap_bulk_write(pdata->regmap, reg, buf, ARRAY_SIZE(buf)); } static u32 ti_sn_bridge_get_dsi_freq(struct ti_sn65dsi86 *pdata) |