OMAPDSS: outputs: Create and register output instances
Add output structs to output driver's private data. Register output instances by having an init function in the probes of the platform device drivers for different outputs. The *_init_output for each output registers the output and fill up the output's plaform device, type and id fields. The *_uninit_output functions unregister the output. In the probe of each interface driver, the output entities are initialized before the *_probe_pdata() functions intentionally. This is done to ensure that the output entity is prepared before the panels connected to the output are registered. We need the output entities to be ready because OMAPDSS will try to make connections between overlays, managers, outputs and devices during the panel's probe. Signed-off-by: Archit Taneja <archit@ti.com>
This commit is contained in:
@@ -68,6 +68,8 @@ static struct {
|
||||
int ct_cp_hpd_gpio;
|
||||
int ls_oe_gpio;
|
||||
int hpd_gpio;
|
||||
|
||||
struct omap_dss_output output;
|
||||
} hdmi;
|
||||
|
||||
/*
|
||||
@@ -970,6 +972,24 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
static void __init hdmi_init_output(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_dss_output *out = &hdmi.output;
|
||||
|
||||
out->pdev = pdev;
|
||||
out->id = OMAP_DSS_OUTPUT_HDMI;
|
||||
out->type = OMAP_DISPLAY_TYPE_HDMI;
|
||||
|
||||
dss_register_output(out);
|
||||
}
|
||||
|
||||
static void __exit hdmi_uninit_output(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_dss_output *out = &hdmi.output;
|
||||
|
||||
dss_unregister_output(out);
|
||||
}
|
||||
|
||||
/* HDMI HW IP initialisation */
|
||||
static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -1013,6 +1033,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
|
||||
|
||||
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
|
||||
|
||||
hdmi_init_output(pdev);
|
||||
|
||||
hdmi_probe_pdata(pdev);
|
||||
|
||||
return 0;
|
||||
@@ -1033,6 +1055,8 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
|
||||
|
||||
hdmi_panel_exit();
|
||||
|
||||
hdmi_uninit_output(pdev);
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
hdmi_put_clocks();
|
||||
|
Reference in New Issue
Block a user