@@ -181,15 +181,6 @@ static const struct regmap_access_table chipone_dsi_writeable_table = {
.n_yes_ranges = ARRAY_SIZE(chipone_dsi_writeable_ranges),
};
-static const struct regmap_config chipone_regmap_config = {
- .reg_bits = 8,
- .val_bits = 8,
- .rd_table = &chipone_dsi_readable_table,
- .wr_table = &chipone_dsi_writeable_table,
- .cache_type = REGCACHE_RBTREE,
- .max_register = MIPI_ATE_STATUS(1),
-};
-
static int chipone_dsi_read(void *context,
const void *reg, size_t reg_size,
void *val, size_t val_size)
@@ -210,11 +201,26 @@ static int chipone_dsi_write(void *context, const void *data, size_t count)
return mipi_dsi_generic_write(dsi, data, 2);
}
-static const struct regmap_bus chipone_dsi_regmap_bus = {
- .read = chipone_dsi_read,
- .write = chipone_dsi_write,
- .reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
- .val_format_endian_default = REGMAP_ENDIAN_NATIVE,
+static const struct regmap_config chipone_regmap_config = {
+ .name = "chipone-i2c",
+ .reg_bits = 8,
+ .val_bits = 8,
+ .rd_table = &chipone_dsi_readable_table,
+ .wr_table = &chipone_dsi_writeable_table,
+ .cache_type = REGCACHE_RBTREE,
+ .max_register = MIPI_ATE_STATUS(1),
+};
+
+static const struct regmap_config chipone_dsi_regmap_config = {
+ .name = "chipone-dsi",
+ .reg_bits = 8,
+ .val_bits = 8,
+ .rd_table = &chipone_dsi_readable_table,
+ .wr_table = &chipone_dsi_writeable_table,
+ .cache_type = REGCACHE_RBTREE,
+ .max_register = MIPI_ATE_STATUS(1),
+ .read = chipone_dsi_read,
+ .write = chipone_dsi_write,
};
static inline struct chipone *bridge_to_chipone(struct drm_bridge *bridge)
@@ -691,8 +697,8 @@ static int chipone_dsi_probe(struct mipi_dsi_device *dsi)
if (ret)
return ret;
- icn->regmap = devm_regmap_init(dev, &chipone_dsi_regmap_bus,
- dsi, &chipone_regmap_config);
+ icn->regmap = devm_regmap_init(dev, NULL,
+ dsi, &chipone_dsi_regmap_config);
if (IS_ERR(icn->regmap))
return PTR_ERR(icn->regmap);
Instead of working around the missing bulk register read/write in regmap_config using regmap_bus callbacks, switch to new regmap_config read/write callbacks. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Mark Brown <broonie@kernel.org> Cc: Maxime Ripard <maxime@cerno.tech> Cc: Robert Foss <robert.foss@linaro.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> To: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/bridge/chipone-icn6211.c | 38 ++++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-)