drm/omap: dss: Move common device operations to common structure
The various types of omapdss_*_ops structures define multiple operations that are not specific to a bus type. To simplify the code and remove dependencies on specific bus types move those operations to a common structure. Operations that are specific to a bus type are kept in the specialized ops structures. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:

committed by
Tomi Valkeinen

parent
e10bd354ad
commit
b93109d7dc
@@ -50,7 +50,7 @@ static int panel_dpi_connect(struct omap_dss_device *dssdev)
|
||||
return PTR_ERR(in);
|
||||
}
|
||||
|
||||
r = in->ops.dpi->connect(in, dssdev);
|
||||
r = in->ops->connect(in, dssdev);
|
||||
if (r) {
|
||||
omap_dss_put_device(in);
|
||||
return r;
|
||||
@@ -68,7 +68,7 @@ static void panel_dpi_disconnect(struct omap_dss_device *dssdev)
|
||||
if (!omapdss_device_is_connected(dssdev))
|
||||
return;
|
||||
|
||||
in->ops.dpi->disconnect(in, dssdev);
|
||||
in->ops->disconnect(in, dssdev);
|
||||
|
||||
omap_dss_put_device(in);
|
||||
ddata->in = NULL;
|
||||
@@ -86,15 +86,15 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
|
||||
if (omapdss_device_is_enabled(dssdev))
|
||||
return 0;
|
||||
|
||||
in->ops.dpi->set_timings(in, &ddata->vm);
|
||||
in->ops->set_timings(in, &ddata->vm);
|
||||
|
||||
r = in->ops.dpi->enable(in);
|
||||
r = in->ops->enable(in);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = regulator_enable(ddata->vcc_supply);
|
||||
if (r) {
|
||||
in->ops.dpi->disable(in);
|
||||
in->ops->disable(in);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
|
||||
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
|
||||
regulator_disable(ddata->vcc_supply);
|
||||
|
||||
in->ops.dpi->disable(in);
|
||||
in->ops->disable(in);
|
||||
|
||||
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ static void panel_dpi_set_timings(struct omap_dss_device *dssdev,
|
||||
|
||||
ddata->vm = *vm;
|
||||
|
||||
in->ops.dpi->set_timings(in, vm);
|
||||
in->ops->set_timings(in, vm);
|
||||
}
|
||||
|
||||
static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
|
||||
@@ -149,7 +149,7 @@ static int panel_dpi_check_timings(struct omap_dss_device *dssdev,
|
||||
struct panel_drv_data *ddata = to_panel_data(dssdev);
|
||||
struct omap_dss_device *in = ddata->in;
|
||||
|
||||
return in->ops.dpi->check_timings(in, vm);
|
||||
return in->ops->check_timings(in, vm);
|
||||
}
|
||||
|
||||
static const struct omap_dss_driver panel_dpi_ops = {
|
||||
|
Reference in New Issue
Block a user