diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-02-28 15:58:13 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-09-03 16:13:26 +0300 |
commit | b93109d7dc9e15649e1cf18281f02d8b4a102584 (patch) | |
tree | 5250492e53cb03bd2b780489f97982bbfbae7f73 /drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | |
parent | e10bd354ad79d2772842300c85ffd1a49722cfae (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index 08e63e39d0b7..1fbc5559e54f 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c @@ -44,7 +44,7 @@ static int tfp410_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; @@ -74,7 +74,7 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev, dst->src = NULL; dssdev->dst = NULL; - in->ops.dpi->disconnect(in, &ddata->dssdev); + in->ops->disconnect(in, &ddata->dssdev); omap_dss_put_device(in); ddata->in = NULL; @@ -92,9 +92,9 @@ static int tfp410_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; @@ -117,7 +117,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev) if (gpio_is_valid(ddata->pd_gpio)) gpio_set_value_cansleep(ddata->pd_gpio, 0); - in->ops.dpi->disable(in); + in->ops->disable(in); dssdev->state = OMAP_DSS_DISPLAY_DISABLED; } @@ -138,7 +138,7 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev, ddata->vm = *vm; - in->ops.dpi->set_timings(in, vm); + in->ops->set_timings(in, vm); } static int tfp410_check_timings(struct omap_dss_device *dssdev, @@ -149,16 +149,14 @@ static int tfp410_check_timings(struct omap_dss_device *dssdev, tfp410_fix_timings(vm); - return in->ops.dpi->check_timings(in, vm); + return in->ops->check_timings(in, vm); } -static const struct omapdss_dvi_ops tfp410_dvi_ops = { +static const struct omap_dss_device_ops tfp410_ops = { .connect = tfp410_connect, .disconnect = tfp410_disconnect, - .enable = tfp410_enable, .disable = tfp410_disable, - .check_timings = tfp410_check_timings, .set_timings = tfp410_set_timings, }; @@ -209,7 +207,7 @@ static int tfp410_probe(struct platform_device *pdev) } dssdev = &ddata->dssdev; - dssdev->ops.dvi = &tfp410_dvi_ops; + dssdev->ops = &tfp410_ops; dssdev->dev = &pdev->dev; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->output_type = OMAP_DISPLAY_TYPE_DVI; |