From 736e60ddc215b85e73bbf7da26e1cde84cc9500f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 4 Jun 2015 15:22:23 +0300 Subject: OMAPDSS: componentize omapdss omapdss kernel module contains drivers for multiple devices, one for each DSS submodule. The probing we have at the moment is a mess, and doesn't give us proper deferred probing nor ensure that all the devices are probed before omapfb/omapdrm start using omapdss. This patch solves the mess by using the component system for DSS submodules. The changes to all DSS submodules (dispc, dpi, dsi, hdmi4/5, rfbi, sdi, venc) are the same: probe & remove functions are changed to bind & unbind, and new probe & remove functions are added which call component_add/del. The dss_core driver (dss.c) acts as a component master. Adding and matching the components is simple: all dss device's child devices are added as components. However, we do have some dependencies between the drivers. The order in which they should be probed is reflected by the list in core.c (dss_output_drv_reg_funcs). The drivers are registered in that order, which causes the components to be added in that order, which makes the components to be bound in that order. This feels a bit fragile, and we probably should improve the code to manage binds in random order. However, for now, this works fine. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/video/fbdev/omap2/dss/dispc.c | 28 ++++++++++++++--- drivers/video/fbdev/omap2/dss/dpi.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/dsi.c | 25 ++++++++++++--- drivers/video/fbdev/omap2/dss/dss.c | 59 ++++++++++++++++++++++++++++++++--- drivers/video/fbdev/omap2/dss/hdmi4.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/hdmi5.c | 26 ++++++++++++--- drivers/video/fbdev/omap2/dss/rfbi.c | 28 ++++++++++++++--- drivers/video/fbdev/omap2/dss/sdi.c | 27 +++++++++++++--- drivers/video/fbdev/omap2/dss/venc.c | 27 +++++++++++++--- 9 files changed, 234 insertions(+), 38 deletions(-) (limited to 'drivers/video/fbdev/omap2/dss') diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index e3417af63451..c8e34163211a 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -39,6 +39,7 @@ #include #include #include +#include #include