summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/omap2/dss/dss.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2014-06-02 14:11:51 +0530
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-12 13:39:57 +0200
commit80eb6751b7cde41cee766230fe07d982d13c1486 (patch)
tree59c72ee13aa9dd765373fb15cbea26bd60e7e64d /drivers/video/fbdev/omap2/dss/dss.c
parent2ac6a1aae8f038662b09f2755827dfbe9456894d (diff)
downloadlinux-next-80eb6751b7cde41cee766230fe07d982d13c1486.tar.gz
OMAPDSS: DPI: Store dpi_data pointer in the DT port's data
DPI and SDI ports are backed by only one parent DSS device. We don't have a corresponding platform_device for ports under DSS. In order to support multiple instances of DPI, we need to pass the driver data pointer through the DPI port's private data ('data' member in device_node struct). dpi_init_output/dpi_uninit_output are untouched and only used for non-DT case, these are called when the DPI platform device probed/removed. These funcs will be removed when non-DT mode is removed. dpi_init_output_port/dpi_uninit_output_port are created and used for the DT path, called when DSS inits/uninits it's ports. These new functions retrieve the dpi_data pointer from 'port->data', and not from the platform device's data(pdev->dev) like in the non-DT path. We add some code in dss_uninit_ports() to pass a pointer to the DPI port in dpi_uninit_port(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/dss.c')
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 8a4a6d2d1edf..391a6da55e8d 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -822,8 +822,18 @@ static int __init dss_init_ports(struct platform_device *pdev)
static void __exit dss_uninit_ports(struct platform_device *pdev)
{
+ struct device_node *parent = pdev->dev.of_node;
+ struct device_node *port;
+
+ if (parent == NULL)
+ return;
+
+ port = omapdss_of_get_next_port(parent, NULL);
+ if (!port)
+ return;
+
#ifdef CONFIG_OMAP2_DSS_DPI
- dpi_uninit_port(pdev);
+ dpi_uninit_port(port);
#endif
#ifdef CONFIG_OMAP2_DSS_SDI