diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays')
12 files changed, 50 insertions, 43 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c index d59b4f2e22dc..563fc7e618b3 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c @@ -119,7 +119,7 @@ static int tvc_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver tvc_driver = { +static const struct omap_dss_device_ops tvc_ops = { .connect = tvc_connect, .disconnect = tvc_disconnect, @@ -146,7 +146,7 @@ static int tvc_probe(struct platform_device *pdev) ddata->vm = tvc_pal_vm; dssdev = &ddata->dssdev; - dssdev->driver = &tvc_driver; + dssdev->ops = &tvc_ops; dssdev->dev = &pdev->dev; dssdev->type = OMAP_DISPLAY_TYPE_VENC; dssdev->owner = THIS_MODULE; diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c index 39e7d0be887f..a639a86cd47b 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c @@ -265,7 +265,7 @@ static void dvic_disable_hpd(struct omap_dss_device *dssdev) mutex_unlock(&ddata->hpd_lock); } -static const struct omap_dss_driver dvic_driver = { +static const struct omap_dss_device_ops dvic_ops = { .connect = dvic_connect, .disconnect = dvic_disconnect, @@ -367,7 +367,7 @@ static int dvic_probe(struct platform_device *pdev) ddata->vm = dvic_default_vm; dssdev = &ddata->dssdev; - dssdev->driver = &dvic_driver; + dssdev->ops = &dvic_ops; dssdev->dev = &pdev->dev; dssdev->type = OMAP_DISPLAY_TYPE_DVI; dssdev->owner = THIS_MODULE; diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c index d39480b8cf6b..54bfd7156360 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c @@ -132,7 +132,7 @@ static int hdmic_read_edid(struct omap_dss_device *dssdev, { struct omap_dss_device *src = dssdev->src; - return src->ops->hdmi.read_edid(src, edid, len); + return src->ops->read_edid(src, edid, len); } static bool hdmic_detect(struct omap_dss_device *dssdev) @@ -144,7 +144,7 @@ static bool hdmic_detect(struct omap_dss_device *dssdev) if (ddata->hpd_gpio) connected = gpiod_get_value_cansleep(ddata->hpd_gpio); else - connected = src->ops->hdmi.detect(src); + connected = src->ops->detect(src); if (!connected && src->ops->hdmi.lost_hotplug) src->ops->hdmi.lost_hotplug(src); return connected; @@ -164,8 +164,8 @@ static int hdmic_register_hpd_cb(struct omap_dss_device *dssdev, ddata->hpd_cb_data = cb_data; mutex_unlock(&ddata->hpd_lock); return 0; - } else if (src->ops->hdmi.register_hpd_cb) { - return src->ops->hdmi.register_hpd_cb(src, cb, cb_data); + } else if (src->ops->register_hpd_cb) { + return src->ops->register_hpd_cb(src, cb, cb_data); } return -ENOTSUPP; @@ -181,8 +181,8 @@ static void hdmic_unregister_hpd_cb(struct omap_dss_device *dssdev) ddata->hpd_cb = NULL; ddata->hpd_cb_data = NULL; mutex_unlock(&ddata->hpd_lock); - } else if (src->ops->hdmi.unregister_hpd_cb) { - src->ops->hdmi.unregister_hpd_cb(src); + } else if (src->ops->unregister_hpd_cb) { + src->ops->unregister_hpd_cb(src); } } @@ -195,8 +195,8 @@ static void hdmic_enable_hpd(struct omap_dss_device *dssdev) mutex_lock(&ddata->hpd_lock); ddata->hpd_enabled = true; mutex_unlock(&ddata->hpd_lock); - } else if (src->ops->hdmi.enable_hpd) { - src->ops->hdmi.enable_hpd(src); + } else if (src->ops->enable_hpd) { + src->ops->enable_hpd(src); } } @@ -209,8 +209,8 @@ static void hdmic_disable_hpd(struct omap_dss_device *dssdev) mutex_lock(&ddata->hpd_lock); ddata->hpd_enabled = false; mutex_unlock(&ddata->hpd_lock); - } else if (src->ops->hdmi.disable_hpd) { - src->ops->hdmi.disable_hpd(src); + } else if (src->ops->disable_hpd) { + src->ops->disable_hpd(src); } } @@ -229,7 +229,7 @@ static int hdmic_set_infoframe(struct omap_dss_device *dssdev, return src->ops->hdmi.set_infoframe(src, avi); } -static const struct omap_dss_driver hdmic_driver = { +static const struct omap_dss_device_ops hdmic_ops = { .connect = hdmic_connect, .disconnect = hdmic_disconnect, @@ -246,8 +246,11 @@ static const struct omap_dss_driver hdmic_driver = { .unregister_hpd_cb = hdmic_unregister_hpd_cb, .enable_hpd = hdmic_enable_hpd, .disable_hpd = hdmic_disable_hpd, - .set_hdmi_mode = hdmic_set_hdmi_mode, - .set_hdmi_infoframe = hdmic_set_infoframe, + + .hdmi = { + .set_hdmi_mode = hdmic_set_hdmi_mode, + .set_infoframe = hdmic_set_infoframe, + }, }; static irqreturn_t hdmic_hpd_isr(int irq, void *data) @@ -309,7 +312,7 @@ static int hdmic_probe(struct platform_device *pdev) ddata->vm = hdmic_default_vm; dssdev = &ddata->dssdev; - dssdev->driver = &hdmic_driver; + dssdev->ops = &hdmic_ops; dssdev->dev = &pdev->dev; dssdev->type = OMAP_DISPLAY_TYPE_HDMI; dssdev->owner = THIS_MODULE; diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index c99e55487d38..0cc7bd656473 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c @@ -125,7 +125,7 @@ static int tpd_read_edid(struct omap_dss_device *dssdev, if (!gpiod_get_value_cansleep(ddata->hpd_gpio)) return -ENODEV; - return src->ops->hdmi.read_edid(src, edid, len); + return src->ops->read_edid(src, edid, len); } static bool tpd_detect(struct omap_dss_device *dssdev) @@ -205,14 +205,14 @@ static const struct omap_dss_device_ops tpd_ops = { .disable = tpd_disable, .check_timings = tpd_check_timings, .set_timings = tpd_set_timings, + .read_edid = tpd_read_edid, + .detect = tpd_detect, + .register_hpd_cb = tpd_register_hpd_cb, + .unregister_hpd_cb = tpd_unregister_hpd_cb, + .enable_hpd = tpd_enable_hpd, + .disable_hpd = tpd_disable_hpd, .hdmi = { - .read_edid = tpd_read_edid, - .detect = tpd_detect, - .register_hpd_cb = tpd_register_hpd_cb, - .unregister_hpd_cb = tpd_unregister_hpd_cb, - .enable_hpd = tpd_enable_hpd, - .disable_hpd = tpd_disable_hpd, .set_infoframe = tpd_set_infoframe, .set_hdmi_mode = tpd_set_hdmi_mode, }, diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 91f99c95c4c4..c03877af9cdb 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -122,7 +122,7 @@ static int panel_dpi_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver panel_dpi_ops = { +static const struct omap_dss_device_ops panel_dpi_ops = { .connect = panel_dpi_connect, .disconnect = panel_dpi_disconnect, @@ -196,7 +196,7 @@ static int panel_dpi_probe(struct platform_device *pdev) dssdev = &ddata->dssdev; dssdev->dev = &pdev->dev; - dssdev->driver = &panel_dpi_ops; + dssdev->ops = &panel_dpi_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index e30f0ab315f5..29692a5217c5 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -1179,18 +1179,21 @@ static void dsicm_get_size(struct omap_dss_device *dssdev, *height = ddata->height_mm; } -static const struct omap_dss_driver dsicm_ops = { +static const struct omap_dss_device_ops dsicm_ops = { .connect = dsicm_connect, .disconnect = dsicm_disconnect, .enable = dsicm_enable, .disable = dsicm_disable, + .get_timings = dsicm_get_timings, + .check_timings = dsicm_check_timings, +}; + +static const struct omap_dss_driver dsicm_dss_driver = { .update = dsicm_update, .sync = dsicm_sync, - .get_timings = dsicm_get_timings, - .check_timings = dsicm_check_timings, .get_size = dsicm_get_size, .enable_te = dsicm_enable_te, @@ -1299,7 +1302,8 @@ static int dsicm_probe(struct platform_device *pdev) dssdev = &ddata->dssdev; dssdev->dev = dev; - dssdev->driver = &dsicm_ops; + dssdev->ops = &dsicm_ops; + dssdev->driver = &dsicm_dss_driver; dssdev->type = OMAP_DISPLAY_TYPE_DSI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 66763a12fc3d..62576e4f89e3 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c @@ -199,7 +199,7 @@ static int lb035q02_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver lb035q02_ops = { +static const struct omap_dss_device_ops lb035q02_ops = { .connect = lb035q02_connect, .disconnect = lb035q02_disconnect, @@ -249,7 +249,7 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) dssdev = &ddata->dssdev; dssdev->dev = &spi->dev; - dssdev->driver = &lb035q02_ops; + dssdev->ops = &lb035q02_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c index 767ffd2fa0f4..9f34cf02a114 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c @@ -187,7 +187,7 @@ static int nec_8048_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver nec_8048_ops = { +static const struct omap_dss_device_ops nec_8048_ops = { .connect = nec_8048_connect, .disconnect = nec_8048_disconnect, @@ -239,7 +239,7 @@ static int nec_8048_probe(struct spi_device *spi) dssdev = &ddata->dssdev; dssdev->dev = &spi->dev; - dssdev->driver = &nec_8048_ops; + dssdev->ops = &nec_8048_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c index 7fbdf3ec0113..9ee6b8376916 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c @@ -161,7 +161,7 @@ static int sharp_ls_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver sharp_ls_ops = { +static const struct omap_dss_device_ops sharp_ls_ops = { .connect = sharp_ls_connect, .disconnect = sharp_ls_disconnect, @@ -247,7 +247,7 @@ static int sharp_ls_probe(struct platform_device *pdev) dssdev = &ddata->dssdev; dssdev->dev = &pdev->dev; - dssdev->driver = &sharp_ls_ops; + dssdev->ops = &sharp_ls_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index 3eca39821d79..d0a8d2810c33 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c @@ -660,7 +660,7 @@ static int acx565akm_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver acx565akm_ops = { +static const struct omap_dss_device_ops acx565akm_ops = { .connect = acx565akm_connect, .disconnect = acx565akm_disconnect, @@ -762,7 +762,7 @@ static int acx565akm_probe(struct spi_device *spi) dssdev = &ddata->dssdev; dssdev->dev = &spi->dev; - dssdev->driver = &acx565akm_ops; + dssdev->ops = &acx565akm_ops; dssdev->type = OMAP_DISPLAY_TYPE_SDI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c index ecb903a93cf4..1b0e42daa296 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c @@ -330,7 +330,7 @@ static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver td028ttec1_ops = { +static const struct omap_dss_device_ops td028ttec1_ops = { .connect = td028ttec1_panel_connect, .disconnect = td028ttec1_panel_disconnect, @@ -371,7 +371,7 @@ static int td028ttec1_panel_probe(struct spi_device *spi) dssdev = &ddata->dssdev; dssdev->dev = &spi->dev; - dssdev->driver = &td028ttec1_ops; + dssdev->ops = &td028ttec1_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c index 1521812ab15b..b211a7809a26 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c @@ -404,7 +404,7 @@ static int tpo_td043_check_timings(struct omap_dss_device *dssdev, return src->ops->check_timings(src, vm); } -static const struct omap_dss_driver tpo_td043_ops = { +static const struct omap_dss_device_ops tpo_td043_ops = { .connect = tpo_td043_connect, .disconnect = tpo_td043_disconnect, @@ -469,7 +469,7 @@ static int tpo_td043_probe(struct spi_device *spi) dssdev = &ddata->dssdev; dssdev->dev = &spi->dev; - dssdev->driver = &tpo_td043_ops; + dssdev->ops = &tpo_td043_ops; dssdev->type = OMAP_DISPLAY_TYPE_DPI; dssdev->owner = THIS_MODULE; dssdev->of_ports = BIT(0); |