diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-02-14 07:17:28 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-06-17 07:00:50 -0400 |
commit | ecc8b370898660613e846667f9c1e8a94f8d4aaa (patch) | |
tree | b68295d545b8ca44be1e00c30046ce3341dc8add /include/video | |
parent | 94140f0d225fd1261e11a9d883be6de5692d57d8 (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 'include/video')
-rw-r--r-- | include/video/omapdss.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index ee1645336fc4..b7d975755cff 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -596,7 +596,11 @@ struct omap_dss_output { | |||
596 | }; | 596 | }; |
597 | 597 | ||
598 | struct omap_dss_device { | 598 | struct omap_dss_device { |
599 | struct device dev; | 599 | /* old device, to be removed */ |
600 | struct device old_dev; | ||
601 | |||
602 | /* new device, pointer to panel device */ | ||
603 | struct device *dev; | ||
600 | 604 | ||
601 | struct list_head panel_list; | 605 | struct list_head panel_list; |
602 | 606 | ||
@@ -856,7 +860,7 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | |||
856 | bool mem_to_mem); | 860 | bool mem_to_mem); |
857 | 861 | ||
858 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) | 862 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) |
859 | #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) | 863 | #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) |
860 | 864 | ||
861 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, | 865 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, |
862 | bool enable); | 866 | bool enable); |