diff options
author | Jyri Sarha <jsarha@ti.com> | 2014-06-27 09:47:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-11-26 03:45:29 -0500 |
commit | 945514b5e1e5f93172a67d4b19b7fce8c8c1fead (patch) | |
tree | 0991c1530a24d10904c25e7b0948cfa3c8484391 /drivers/video | |
parent | 58652163f6cad5180aaa1e82612c1f87cd2e22b8 (diff) |
OMAPDSS: hdmi: Make hdmi structure public
Unify the private anonymous struct in hdmi4.c and hdmi5.c, name it as
struct omap_hdmi, and make it public in hdmi.h.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi.h | 20 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi4.c | 30 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi5.c | 20 |
3 files changed, 30 insertions, 40 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi.h b/drivers/video/fbdev/omap2/dss/hdmi.h index 5e0df84a736a..a7d6474c69ad 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi.h +++ b/drivers/video/fbdev/omap2/dss/hdmi.h | |||
@@ -335,4 +335,24 @@ static inline bool hdmi_mode_has_audio(int mode) | |||
335 | { | 335 | { |
336 | return mode == HDMI_HDMI ? true : false; | 336 | return mode == HDMI_HDMI ? true : false; |
337 | } | 337 | } |
338 | |||
339 | /* HDMI DRV data */ | ||
340 | struct omap_hdmi { | ||
341 | struct mutex lock; | ||
342 | struct platform_device *pdev; | ||
343 | |||
344 | struct hdmi_wp_data wp; | ||
345 | struct hdmi_pll_data pll; | ||
346 | struct hdmi_phy_data phy; | ||
347 | struct hdmi_core_data core; | ||
348 | |||
349 | struct hdmi_config cfg; | ||
350 | |||
351 | struct regulator *vdda_reg; | ||
352 | |||
353 | bool core_enabled; | ||
354 | |||
355 | struct omap_dss_device output; | ||
356 | }; | ||
357 | |||
338 | #endif | 358 | #endif |
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index 46dcc71ce058..1005cea38ff0 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/dss/hdmi4.c | |||
@@ -37,24 +37,9 @@ | |||
37 | #include "hdmi4_core.h" | 37 | #include "hdmi4_core.h" |
38 | #include "dss.h" | 38 | #include "dss.h" |
39 | #include "dss_features.h" | 39 | #include "dss_features.h" |
40 | #include "hdmi.h" | ||
40 | 41 | ||
41 | static struct { | 42 | static struct omap_hdmi hdmi; |
42 | struct mutex lock; | ||
43 | struct platform_device *pdev; | ||
44 | |||
45 | struct hdmi_wp_data wp; | ||
46 | struct hdmi_pll_data pll; | ||
47 | struct hdmi_phy_data phy; | ||
48 | struct hdmi_core_data core; | ||
49 | |||
50 | struct hdmi_config cfg; | ||
51 | |||
52 | struct regulator *vdda_hdmi_dac_reg; | ||
53 | |||
54 | bool core_enabled; | ||
55 | |||
56 | struct omap_dss_device output; | ||
57 | } hdmi; | ||
58 | 43 | ||
59 | static int hdmi_runtime_get(void) | 44 | static int hdmi_runtime_get(void) |
60 | { | 45 | { |
@@ -116,7 +101,7 @@ static int hdmi_init_regulator(void) | |||
116 | int r; | 101 | int r; |
117 | struct regulator *reg; | 102 | struct regulator *reg; |
118 | 103 | ||
119 | if (hdmi.vdda_hdmi_dac_reg != NULL) | 104 | if (hdmi.vdda_reg != NULL) |
120 | return 0; | 105 | return 0; |
121 | 106 | ||
122 | reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); | 107 | reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); |
@@ -136,7 +121,7 @@ static int hdmi_init_regulator(void) | |||
136 | } | 121 | } |
137 | } | 122 | } |
138 | 123 | ||
139 | hdmi.vdda_hdmi_dac_reg = reg; | 124 | hdmi.vdda_reg = reg; |
140 | 125 | ||
141 | return 0; | 126 | return 0; |
142 | } | 127 | } |
@@ -145,7 +130,7 @@ static int hdmi_power_on_core(struct omap_dss_device *dssdev) | |||
145 | { | 130 | { |
146 | int r; | 131 | int r; |
147 | 132 | ||
148 | r = regulator_enable(hdmi.vdda_hdmi_dac_reg); | 133 | r = regulator_enable(hdmi.vdda_reg); |
149 | if (r) | 134 | if (r) |
150 | return r; | 135 | return r; |
151 | 136 | ||
@@ -161,7 +146,7 @@ static int hdmi_power_on_core(struct omap_dss_device *dssdev) | |||
161 | return 0; | 146 | return 0; |
162 | 147 | ||
163 | err_runtime_get: | 148 | err_runtime_get: |
164 | regulator_disable(hdmi.vdda_hdmi_dac_reg); | 149 | regulator_disable(hdmi.vdda_reg); |
165 | 150 | ||
166 | return r; | 151 | return r; |
167 | } | 152 | } |
@@ -171,7 +156,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev) | |||
171 | hdmi.core_enabled = false; | 156 | hdmi.core_enabled = false; |
172 | 157 | ||
173 | hdmi_runtime_put(); | 158 | hdmi_runtime_put(); |
174 | regulator_disable(hdmi.vdda_hdmi_dac_reg); | 159 | regulator_disable(hdmi.vdda_reg); |
175 | } | 160 | } |
176 | 161 | ||
177 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) | 162 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) |
@@ -666,6 +651,7 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) | |||
666 | int irq; | 651 | int irq; |
667 | 652 | ||
668 | hdmi.pdev = pdev; | 653 | hdmi.pdev = pdev; |
654 | dev_set_drvdata(&pdev->dev, &hdmi); | ||
669 | 655 | ||
670 | mutex_init(&hdmi.lock); | 656 | mutex_init(&hdmi.lock); |
671 | 657 | ||
diff --git a/drivers/video/fbdev/omap2/dss/hdmi5.c b/drivers/video/fbdev/omap2/dss/hdmi5.c index 67facf87b370..6e5894fb96ce 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/dss/hdmi5.c | |||
@@ -43,24 +43,7 @@ | |||
43 | #include "dss.h" | 43 | #include "dss.h" |
44 | #include "dss_features.h" | 44 | #include "dss_features.h" |
45 | 45 | ||
46 | static struct { | 46 | static struct omap_hdmi hdmi; |
47 | struct mutex lock; | ||
48 | struct platform_device *pdev; | ||
49 | |||
50 | struct hdmi_wp_data wp; | ||
51 | struct hdmi_pll_data pll; | ||
52 | struct hdmi_phy_data phy; | ||
53 | struct hdmi_core_data core; | ||
54 | |||
55 | struct hdmi_config cfg; | ||
56 | |||
57 | struct regulator *vdda_reg; | ||
58 | struct clk *sys_clk; | ||
59 | |||
60 | bool core_enabled; | ||
61 | |||
62 | struct omap_dss_device output; | ||
63 | } hdmi; | ||
64 | 47 | ||
65 | static int hdmi_runtime_get(void) | 48 | static int hdmi_runtime_get(void) |
66 | { | 49 | { |
@@ -696,6 +679,7 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) | |||
696 | int irq; | 679 | int irq; |
697 | 680 | ||
698 | hdmi.pdev = pdev; | 681 | hdmi.pdev = pdev; |
682 | dev_set_drvdata(&pdev->dev, &hdmi); | ||
699 | 683 | ||
700 | mutex_init(&hdmi.lock); | 684 | mutex_init(&hdmi.lock); |
701 | 685 | ||