diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-02-14 16:17:28 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-06-17 15:00:50 +0400 |
commit | ecc8b370898660613e846667f9c1e8a94f8d4aaa (patch) | |
tree | b68295d545b8ca44be1e00c30046ce3341dc8add /drivers/video/omap2/displays/panel-generic-dpi.c | |
parent | 94140f0d225fd1261e11a9d883be6de5692d57d8 (diff) | |
download | linux-ecc8b370898660613e846667f9c1e8a94f8d4aaa.tar.xz |
OMAPDSS: Add panel dev pointer to dssdev
We are about to remove the dss bus support, which also means that the
omap_dss_device won't be a real device anymore. This means that the
embedded "dev" struct needs to be removed from omap_dss_device.
After we've finished the removal of the dss bus, we see the following
changes:
- struct omap_dss_device won't be a real Linux device anymore, but more
like a "display entity".
- struct omap_dss_driver won't be a Linux device driver, but "display
entity ops".
- The panel devices/drivers won't be omapdss devices/drivers, but
platform/i2c/spi/etc devices/drivers, whichever fits the control
mechanism of the panel.
- The panel drivers will create omap_dss_device and omap_dss_driver,
fill the required fields, and register the omap_dss_device to
omapdss.
- omap_dss_device won't have an embedded dev struct anymore, but a
dev pointer to the actual device that manages the omap_dss_device.
The model described above resembles the model that has been discussed
with CDF (common display framework).
For the duration of the conversion, we temporarily have two devs in the
dssdev, the old "old_dev", which is a full embedded device struct, and the
new "dev", which is a pointer to the device. "old_dev" will be removed
in the future.
For devices belonging to dss bus the dev is initialized to point to
old_dev. This way all the code can just use the dev, for both old and
new style panels.
Both the new and old style panel drivers work during the conversion, and
only after the dss bus support is removed will the old style panels stop
to compile.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-generic-dpi.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-generic-dpi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c index 97363f733683..bebebd45847f 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c @@ -536,7 +536,7 @@ static int generic_dpi_panel_power_on(struct omap_dss_device *dssdev) { int r, i; struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev); - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); struct panel_config *panel_config = drv_data->panel_config; if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) @@ -567,7 +567,7 @@ err0: static void generic_dpi_panel_power_off(struct omap_dss_device *dssdev) { struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev); - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); struct panel_config *panel_config = drv_data->panel_config; int i; @@ -593,7 +593,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) struct panel_drv_data *drv_data = NULL; int i, r; - dev_dbg(&dssdev->dev, "probe\n"); + dev_dbg(dssdev->dev, "probe\n"); if (!panel_data || !panel_data->name) return -EINVAL; @@ -609,7 +609,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) return -EINVAL; for (i = 0; i < panel_data->num_gpios; ++i) { - r = devm_gpio_request_one(&dssdev->dev, panel_data->gpios[i], + r = devm_gpio_request_one(dssdev->dev, panel_data->gpios[i], panel_data->gpio_invert[i] ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW, "panel gpio"); @@ -619,7 +619,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) dssdev->panel.timings = panel_config->timings; - drv_data = devm_kzalloc(&dssdev->dev, sizeof(*drv_data), GFP_KERNEL); + drv_data = devm_kzalloc(dssdev->dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) return -ENOMEM; @@ -628,21 +628,21 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) mutex_init(&drv_data->lock); - dev_set_drvdata(&dssdev->dev, drv_data); + dev_set_drvdata(dssdev->dev, drv_data); return 0; } static void __exit generic_dpi_panel_remove(struct omap_dss_device *dssdev) { - dev_dbg(&dssdev->dev, "remove\n"); + dev_dbg(dssdev->dev, "remove\n"); - dev_set_drvdata(&dssdev->dev, NULL); + dev_set_drvdata(dssdev->dev, NULL); } static int generic_dpi_panel_enable(struct omap_dss_device *dssdev) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); int r; mutex_lock(&drv_data->lock); @@ -660,7 +660,7 @@ err: static void generic_dpi_panel_disable(struct omap_dss_device *dssdev) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); mutex_lock(&drv_data->lock); @@ -674,7 +674,7 @@ static void generic_dpi_panel_disable(struct omap_dss_device *dssdev) static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); mutex_lock(&drv_data->lock); @@ -688,7 +688,7 @@ static void generic_dpi_panel_set_timings(struct omap_dss_device *dssdev, static void generic_dpi_panel_get_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); mutex_lock(&drv_data->lock); @@ -700,7 +700,7 @@ static void generic_dpi_panel_get_timings(struct omap_dss_device *dssdev, static int generic_dpi_panel_check_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_drv_data *drv_data = dev_get_drvdata(dssdev->dev); int r; mutex_lock(&drv_data->lock); |