aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/display.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-02-14 07:17:28 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:50 -0400
commitecc8b370898660613e846667f9c1e8a94f8d4aaa (patch)
treeb68295d545b8ca44be1e00c30046ce3341dc8add /drivers/video/omap2/dss/display.c
parent94140f0d225fd1261e11a9d883be6de5692d57d8 (diff)
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/dss/display.c')
-rw-r--r--drivers/video/omap2/dss/display.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index dfe3322cd9ad..a9a1d5563aa0 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -160,13 +160,13 @@ EXPORT_SYMBOL(omapdss_unregister_display);
160 160
161void omap_dss_get_device(struct omap_dss_device *dssdev) 161void omap_dss_get_device(struct omap_dss_device *dssdev)
162{ 162{
163 get_device(&dssdev->dev); 163 get_device(dssdev->dev);
164} 164}
165EXPORT_SYMBOL(omap_dss_get_device); 165EXPORT_SYMBOL(omap_dss_get_device);
166 166
167void omap_dss_put_device(struct omap_dss_device *dssdev) 167void omap_dss_put_device(struct omap_dss_device *dssdev)
168{ 168{
169 put_device(&dssdev->dev); 169 put_device(dssdev->dev);
170} 170}
171EXPORT_SYMBOL(omap_dss_put_device); 171EXPORT_SYMBOL(omap_dss_put_device);
172 172
@@ -240,9 +240,8 @@ int omap_dss_start_device(struct omap_dss_device *dssdev)
240 return -ENODEV; 240 return -ENODEV;
241 } 241 }
242 242
243 if (!try_module_get(dssdev->dev.driver->owner)) { 243 if (!try_module_get(dssdev->dev->driver->owner))
244 return -ENODEV; 244 return -ENODEV;
245 }
246 245
247 return 0; 246 return 0;
248} 247}
@@ -250,7 +249,7 @@ EXPORT_SYMBOL(omap_dss_start_device);
250 249
251void omap_dss_stop_device(struct omap_dss_device *dssdev) 250void omap_dss_stop_device(struct omap_dss_device *dssdev)
252{ 251{
253 module_put(dssdev->dev.driver->owner); 252 module_put(dssdev->dev->driver->owner);
254} 253}
255EXPORT_SYMBOL(omap_dss_stop_device); 254EXPORT_SYMBOL(omap_dss_stop_device);
256 255