blob: 90077619029de28c2c2b479c109bcc5cacd6bbe8 [file] [log] [blame]
Rob Clarkc8afe682013-06-26 12:44:06 -04001/*
2 * Copyright (C) 2013 Red Hat
3 * Author: Rob Clark <robdclark@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "hdmi.h"
19
Rob Clarkc8afe682013-06-26 12:44:06 -040020void hdmi_set_mode(struct hdmi *hdmi, bool power_on)
21{
22 uint32_t ctrl = 0;
23
24 if (power_on) {
25 ctrl |= HDMI_CTRL_ENABLE;
26 if (!hdmi->hdmi_mode) {
27 ctrl |= HDMI_CTRL_HDMI;
28 hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
29 ctrl &= ~HDMI_CTRL_HDMI;
30 } else {
31 ctrl |= HDMI_CTRL_HDMI;
32 }
33 } else {
34 ctrl = HDMI_CTRL_HDMI;
35 }
36
37 hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
38 DBG("HDMI Core: %s, HDMI_CTRL=0x%08x",
39 power_on ? "Enable" : "Disable", ctrl);
40}
41
Rob Clarkdada25b2013-12-01 12:12:54 -050042irqreturn_t hdmi_irq(int irq, void *dev_id)
Rob Clarkc8afe682013-06-26 12:44:06 -040043{
44 struct hdmi *hdmi = dev_id;
45
46 /* Process HPD: */
47 hdmi_connector_irq(hdmi->connector);
48
49 /* Process DDC: */
50 hdmi_i2c_irq(hdmi->i2c);
51
52 /* TODO audio.. */
53
54 return IRQ_HANDLED;
55}
56
Rob Clarka3376e32013-08-30 13:02:15 -040057void hdmi_destroy(struct kref *kref)
Rob Clarkc8afe682013-06-26 12:44:06 -040058{
Rob Clarka3376e32013-08-30 13:02:15 -040059 struct hdmi *hdmi = container_of(kref, struct hdmi, refcount);
Rob Clarkc8afe682013-06-26 12:44:06 -040060 struct hdmi_phy *phy = hdmi->phy;
61
62 if (phy)
63 phy->funcs->destroy(phy);
64
65 if (hdmi->i2c)
66 hdmi_i2c_destroy(hdmi->i2c);
67
Rob Clarkc0c0d9e2013-12-11 14:44:02 -050068 platform_set_drvdata(hdmi->pdev, NULL);
Rob Clarkc8afe682013-06-26 12:44:06 -040069}
70
Rob Clark067fef32014-11-04 13:33:14 -050071/* construct hdmi at bind/probe time, grab all the resources. If
72 * we are to EPROBE_DEFER we want to do it here, rather than later
73 * at modeset_init() time
74 */
75static struct hdmi *hdmi_init(struct platform_device *pdev)
Rob Clarkc8afe682013-06-26 12:44:06 -040076{
Rob Clark067fef32014-11-04 13:33:14 -050077 struct hdmi_platform_config *config = pdev->dev.platform_data;
Rob Clarka3376e32013-08-30 13:02:15 -040078 struct hdmi *hdmi = NULL;
Rob Clarkdada25b2013-12-01 12:12:54 -050079 int i, ret;
Rob Clarkc8afe682013-06-26 12:44:06 -040080
Rob Clark067fef32014-11-04 13:33:14 -050081 hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
Rob Clarka3376e32013-08-30 13:02:15 -040082 if (!hdmi) {
83 ret = -ENOMEM;
84 goto fail;
85 }
86
87 kref_init(&hdmi->refcount);
88
Rob Clarkc8afe682013-06-26 12:44:06 -040089 hdmi->pdev = pdev;
Rob Clarkdada25b2013-12-01 12:12:54 -050090 hdmi->config = config;
Rob Clarkc0c0d9e2013-12-11 14:44:02 -050091
Rob Clarkc8afe682013-06-26 12:44:06 -040092 /* not sure about which phy maps to which msm.. probably I miss some */
93 if (config->phy_init)
94 hdmi->phy = config->phy_init(hdmi);
95 else
96 hdmi->phy = ERR_PTR(-ENXIO);
97
98 if (IS_ERR(hdmi->phy)) {
99 ret = PTR_ERR(hdmi->phy);
Rob Clark067fef32014-11-04 13:33:14 -0500100 dev_err(&pdev->dev, "failed to load phy: %d\n", ret);
Rob Clarkc8afe682013-06-26 12:44:06 -0400101 hdmi->phy = NULL;
102 goto fail;
103 }
104
Rob Clarkdada25b2013-12-01 12:12:54 -0500105 hdmi->mmio = msm_ioremap(pdev, config->mmio_name, "HDMI");
Rob Clarkc8afe682013-06-26 12:44:06 -0400106 if (IS_ERR(hdmi->mmio)) {
107 ret = PTR_ERR(hdmi->mmio);
108 goto fail;
109 }
110
Rob Clarkdada25b2013-12-01 12:12:54 -0500111 BUG_ON(config->hpd_reg_cnt > ARRAY_SIZE(hdmi->hpd_regs));
112 for (i = 0; i < config->hpd_reg_cnt; i++) {
113 struct regulator *reg;
114
Rob Clark3e875992014-08-01 13:08:11 -0400115 reg = devm_regulator_get(&pdev->dev,
Rob Clark41e69772013-12-15 16:23:05 -0500116 config->hpd_reg_names[i]);
Rob Clarkdada25b2013-12-01 12:12:54 -0500117 if (IS_ERR(reg)) {
118 ret = PTR_ERR(reg);
Rob Clark067fef32014-11-04 13:33:14 -0500119 dev_err(&pdev->dev, "failed to get hpd regulator: %s (%d)\n",
Rob Clarkdada25b2013-12-01 12:12:54 -0500120 config->hpd_reg_names[i], ret);
121 goto fail;
122 }
123
124 hdmi->hpd_regs[i] = reg;
Rob Clarkc8afe682013-06-26 12:44:06 -0400125 }
126
Rob Clarkdada25b2013-12-01 12:12:54 -0500127 BUG_ON(config->pwr_reg_cnt > ARRAY_SIZE(hdmi->pwr_regs));
128 for (i = 0; i < config->pwr_reg_cnt; i++) {
129 struct regulator *reg;
Rob Clarkc8afe682013-06-26 12:44:06 -0400130
Rob Clark3e875992014-08-01 13:08:11 -0400131 reg = devm_regulator_get(&pdev->dev,
Rob Clark41e69772013-12-15 16:23:05 -0500132 config->pwr_reg_names[i]);
Rob Clarkdada25b2013-12-01 12:12:54 -0500133 if (IS_ERR(reg)) {
134 ret = PTR_ERR(reg);
Rob Clark067fef32014-11-04 13:33:14 -0500135 dev_err(&pdev->dev, "failed to get pwr regulator: %s (%d)\n",
Rob Clarkdada25b2013-12-01 12:12:54 -0500136 config->pwr_reg_names[i], ret);
137 goto fail;
138 }
139
140 hdmi->pwr_regs[i] = reg;
Rob Clarkc8afe682013-06-26 12:44:06 -0400141 }
142
Rob Clarkdada25b2013-12-01 12:12:54 -0500143 BUG_ON(config->hpd_clk_cnt > ARRAY_SIZE(hdmi->hpd_clks));
144 for (i = 0; i < config->hpd_clk_cnt; i++) {
145 struct clk *clk;
146
147 clk = devm_clk_get(&pdev->dev, config->hpd_clk_names[i]);
148 if (IS_ERR(clk)) {
149 ret = PTR_ERR(clk);
Rob Clark067fef32014-11-04 13:33:14 -0500150 dev_err(&pdev->dev, "failed to get hpd clk: %s (%d)\n",
Rob Clarkdada25b2013-12-01 12:12:54 -0500151 config->hpd_clk_names[i], ret);
152 goto fail;
153 }
154
155 hdmi->hpd_clks[i] = clk;
Rob Clarkc8afe682013-06-26 12:44:06 -0400156 }
157
Rob Clarkdada25b2013-12-01 12:12:54 -0500158 BUG_ON(config->pwr_clk_cnt > ARRAY_SIZE(hdmi->pwr_clks));
159 for (i = 0; i < config->pwr_clk_cnt; i++) {
160 struct clk *clk;
161
162 clk = devm_clk_get(&pdev->dev, config->pwr_clk_names[i]);
163 if (IS_ERR(clk)) {
164 ret = PTR_ERR(clk);
Rob Clark067fef32014-11-04 13:33:14 -0500165 dev_err(&pdev->dev, "failed to get pwr clk: %s (%d)\n",
Rob Clarkdada25b2013-12-01 12:12:54 -0500166 config->pwr_clk_names[i], ret);
167 goto fail;
168 }
169
170 hdmi->pwr_clks[i] = clk;
Rob Clarkc8afe682013-06-26 12:44:06 -0400171 }
172
173 hdmi->i2c = hdmi_i2c_init(hdmi);
174 if (IS_ERR(hdmi->i2c)) {
175 ret = PTR_ERR(hdmi->i2c);
Rob Clark067fef32014-11-04 13:33:14 -0500176 dev_err(&pdev->dev, "failed to get i2c: %d\n", ret);
Rob Clarkc8afe682013-06-26 12:44:06 -0400177 hdmi->i2c = NULL;
178 goto fail;
179 }
180
Rob Clark067fef32014-11-04 13:33:14 -0500181 return hdmi;
182
183fail:
184 if (hdmi)
185 hdmi_destroy(&hdmi->refcount);
186
187 return ERR_PTR(ret);
188}
189
190/* Second part of initialization, the drm/kms level modeset_init,
191 * constructs/initializes mode objects, etc, is called from master
192 * driver (not hdmi sub-device's probe/bind!)
193 *
194 * Any resource (regulator/clk/etc) which could be missing at boot
195 * should be handled in hdmi_init() so that failure happens from
196 * hdmi sub-device's probe.
197 */
198int hdmi_modeset_init(struct hdmi *hdmi,
199 struct drm_device *dev, struct drm_encoder *encoder)
200{
201 struct msm_drm_private *priv = dev->dev_private;
202 struct platform_device *pdev = hdmi->pdev;
203 struct hdmi_platform_config *config = pdev->dev.platform_data;
204 int ret;
205
206 hdmi->dev = dev;
207 hdmi->encoder = encoder;
208
209 hdmi_audio_infoframe_init(&hdmi->audio.infoframe);
210
Rob Clarka3376e32013-08-30 13:02:15 -0400211 hdmi->bridge = hdmi_bridge_init(hdmi);
212 if (IS_ERR(hdmi->bridge)) {
213 ret = PTR_ERR(hdmi->bridge);
214 dev_err(dev->dev, "failed to create HDMI bridge: %d\n", ret);
215 hdmi->bridge = NULL;
216 goto fail;
217 }
218
219 hdmi->connector = hdmi_connector_init(hdmi);
220 if (IS_ERR(hdmi->connector)) {
221 ret = PTR_ERR(hdmi->connector);
222 dev_err(dev->dev, "failed to create HDMI connector: %d\n", ret);
223 hdmi->connector = NULL;
224 goto fail;
225 }
226
Rob Clarkdada25b2013-12-01 12:12:54 -0500227 if (!config->shared_irq) {
228 hdmi->irq = platform_get_irq(pdev, 0);
229 if (hdmi->irq < 0) {
230 ret = hdmi->irq;
231 dev_err(dev->dev, "failed to get irq: %d\n", ret);
232 goto fail;
233 }
Rob Clarkc8afe682013-06-26 12:44:06 -0400234
Rob Clarkdada25b2013-12-01 12:12:54 -0500235 ret = devm_request_threaded_irq(&pdev->dev, hdmi->irq,
236 NULL, hdmi_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
237 "hdmi_isr", hdmi);
238 if (ret < 0) {
239 dev_err(dev->dev, "failed to request IRQ%u: %d\n",
240 hdmi->irq, ret);
241 goto fail;
242 }
Rob Clarkc8afe682013-06-26 12:44:06 -0400243 }
244
Rob Clarka3376e32013-08-30 13:02:15 -0400245 encoder->bridge = hdmi->bridge;
246
247 priv->bridges[priv->num_bridges++] = hdmi->bridge;
248 priv->connectors[priv->num_connectors++] = hdmi->connector;
249
Rob Clarkc0c0d9e2013-12-11 14:44:02 -0500250 platform_set_drvdata(pdev, hdmi);
251
Rob Clark067fef32014-11-04 13:33:14 -0500252 return 0;
Rob Clarkc8afe682013-06-26 12:44:06 -0400253
254fail:
Rob Clark067fef32014-11-04 13:33:14 -0500255 /* bridge/connector are normally destroyed by drm: */
256 if (hdmi->bridge) {
257 hdmi->bridge->funcs->destroy(hdmi->bridge);
258 hdmi->bridge = NULL;
259 }
260 if (hdmi->connector) {
261 hdmi->connector->funcs->destroy(hdmi->connector);
262 hdmi->connector = NULL;
Rob Clarka3376e32013-08-30 13:02:15 -0400263 }
Rob Clarkc8afe682013-06-26 12:44:06 -0400264
Rob Clark067fef32014-11-04 13:33:14 -0500265 return ret;
Rob Clarkc8afe682013-06-26 12:44:06 -0400266}
267
268/*
269 * The hdmi device:
270 */
271
Rob Clarkdada25b2013-12-01 12:12:54 -0500272#include <linux/of_gpio.h>
273
Rob Clark067fef32014-11-04 13:33:14 -0500274static void set_hdmi(struct drm_device *dev, struct hdmi *hdmi)
Rob Clark060530f2014-03-03 14:19:12 -0500275{
276 struct msm_drm_private *priv = dev->dev_private;
Rob Clark067fef32014-11-04 13:33:14 -0500277 priv->hdmi = hdmi;
Rob Clark060530f2014-03-03 14:19:12 -0500278}
279
Mark Charleboisfc886102014-08-29 11:05:50 -0700280#ifdef CONFIG_OF
281static int get_gpio(struct device *dev, struct device_node *of_node, const char *name)
282{
283 int gpio = of_get_named_gpio(of_node, name, 0);
284 if (gpio < 0) {
285 char name2[32];
286 snprintf(name2, sizeof(name2), "%s-gpio", name);
287 gpio = of_get_named_gpio(of_node, name2, 0);
288 if (gpio < 0) {
289 dev_err(dev, "failed to get gpio: %s (%d)\n",
290 name, gpio);
291 gpio = -1;
292 }
293 }
294 return gpio;
295}
296#endif
297
Rob Clark060530f2014-03-03 14:19:12 -0500298static int hdmi_bind(struct device *dev, struct device *master, void *data)
Rob Clarkc8afe682013-06-26 12:44:06 -0400299{
300 static struct hdmi_platform_config config = {};
Rob Clark067fef32014-11-04 13:33:14 -0500301 struct hdmi *hdmi;
Rob Clarkc8afe682013-06-26 12:44:06 -0400302#ifdef CONFIG_OF
Rob Clark060530f2014-03-03 14:19:12 -0500303 struct device_node *of_node = dev->of_node;
Rob Clarkdada25b2013-12-01 12:12:54 -0500304
Rob Clark41e69772013-12-15 16:23:05 -0500305 if (of_device_is_compatible(of_node, "qcom,hdmi-tx-8074")) {
306 static const char *hpd_reg_names[] = {"hpd-gdsc", "hpd-5v"};
307 static const char *pwr_reg_names[] = {"core-vdda", "core-vcc"};
308 static const char *hpd_clk_names[] = {"iface_clk", "core_clk", "mdp_core_clk"};
309 static unsigned long hpd_clk_freq[] = {0, 19200000, 0};
310 static const char *pwr_clk_names[] = {"extp_clk", "alt_iface_clk"};
311 config.phy_init = hdmi_phy_8x74_init;
312 config.hpd_reg_names = hpd_reg_names;
313 config.hpd_reg_cnt = ARRAY_SIZE(hpd_reg_names);
314 config.pwr_reg_names = pwr_reg_names;
315 config.pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names);
316 config.hpd_clk_names = hpd_clk_names;
317 config.hpd_freq = hpd_clk_freq;
318 config.hpd_clk_cnt = ARRAY_SIZE(hpd_clk_names);
319 config.pwr_clk_names = pwr_clk_names;
320 config.pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names);
321 config.shared_irq = true;
322 } else if (of_device_is_compatible(of_node, "qcom,hdmi-tx-8960")) {
323 static const char *hpd_clk_names[] = {"core_clk", "master_iface_clk", "slave_iface_clk"};
324 static const char *hpd_reg_names[] = {"core-vdda", "hdmi-mux"};
325 config.phy_init = hdmi_phy_8960_init;
326 config.hpd_reg_names = hpd_reg_names;
327 config.hpd_reg_cnt = ARRAY_SIZE(hpd_reg_names);
328 config.hpd_clk_names = hpd_clk_names;
329 config.hpd_clk_cnt = ARRAY_SIZE(hpd_clk_names);
330 } else if (of_device_is_compatible(of_node, "qcom,hdmi-tx-8660")) {
331 config.phy_init = hdmi_phy_8x60_init;
332 } else {
333 dev_err(dev, "unknown phy: %s\n", of_node->name);
334 }
Rob Clarkdada25b2013-12-01 12:12:54 -0500335
Rob Clarkdada25b2013-12-01 12:12:54 -0500336 config.mmio_name = "core_physical";
Mark Charleboisfc886102014-08-29 11:05:50 -0700337 config.ddc_clk_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-ddc-clk");
338 config.ddc_data_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-ddc-data");
339 config.hpd_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-hpd");
340 config.mux_en_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-en");
341 config.mux_sel_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-sel");
342 config.mux_lpm_gpio = get_gpio(dev, of_node, "qcom,hdmi-tx-mux-lpm");
Rob Clarkdada25b2013-12-01 12:12:54 -0500343
Rob Clarkc8afe682013-06-26 12:44:06 -0400344#else
Rob Clarkdada25b2013-12-01 12:12:54 -0500345 static const char *hpd_clk_names[] = {
346 "core_clk", "master_iface_clk", "slave_iface_clk",
347 };
Rob Clarkc8afe682013-06-26 12:44:06 -0400348 if (cpu_is_apq8064()) {
Rob Clarkdada25b2013-12-01 12:12:54 -0500349 static const char *hpd_reg_names[] = {"8921_hdmi_mvs"};
Rob Clarkc8afe682013-06-26 12:44:06 -0400350 config.phy_init = hdmi_phy_8960_init;
Rob Clarkdada25b2013-12-01 12:12:54 -0500351 config.mmio_name = "hdmi_msm_hdmi_addr";
352 config.hpd_reg_names = hpd_reg_names;
353 config.hpd_reg_cnt = ARRAY_SIZE(hpd_reg_names);
354 config.hpd_clk_names = hpd_clk_names;
355 config.hpd_clk_cnt = ARRAY_SIZE(hpd_clk_names);
Rob Clarkc8afe682013-06-26 12:44:06 -0400356 config.ddc_clk_gpio = 70;
357 config.ddc_data_gpio = 71;
358 config.hpd_gpio = 72;
Rob Clarkdada25b2013-12-01 12:12:54 -0500359 config.mux_en_gpio = -1;
Rob Clarkc0c0d9e2013-12-11 14:44:02 -0500360 config.mux_sel_gpio = -1;
Rob Clarke529c7e2013-11-16 13:07:31 -0500361 } else if (cpu_is_msm8960() || cpu_is_msm8960ab()) {
Rob Clarkdada25b2013-12-01 12:12:54 -0500362 static const char *hpd_reg_names[] = {"8921_hdmi_mvs"};
Rob Clarkc8afe682013-06-26 12:44:06 -0400363 config.phy_init = hdmi_phy_8960_init;
Rob Clarkdada25b2013-12-01 12:12:54 -0500364 config.mmio_name = "hdmi_msm_hdmi_addr";
365 config.hpd_reg_names = hpd_reg_names;
366 config.hpd_reg_cnt = ARRAY_SIZE(hpd_reg_names);
367 config.hpd_clk_names = hpd_clk_names;
368 config.hpd_clk_cnt = ARRAY_SIZE(hpd_clk_names);
Rob Clarkc8afe682013-06-26 12:44:06 -0400369 config.ddc_clk_gpio = 100;
370 config.ddc_data_gpio = 101;
371 config.hpd_gpio = 102;
Rob Clarkdada25b2013-12-01 12:12:54 -0500372 config.mux_en_gpio = -1;
373 config.mux_sel_gpio = -1;
Rob Clarkc8afe682013-06-26 12:44:06 -0400374 } else if (cpu_is_msm8x60()) {
Rob Clarkdada25b2013-12-01 12:12:54 -0500375 static const char *hpd_reg_names[] = {
376 "8901_hdmi_mvs", "8901_mpp0"
377 };
Rob Clarkc8afe682013-06-26 12:44:06 -0400378 config.phy_init = hdmi_phy_8x60_init;
Rob Clarkdada25b2013-12-01 12:12:54 -0500379 config.mmio_name = "hdmi_msm_hdmi_addr";
380 config.hpd_reg_names = hpd_reg_names;
381 config.hpd_reg_cnt = ARRAY_SIZE(hpd_reg_names);
382 config.hpd_clk_names = hpd_clk_names;
383 config.hpd_clk_cnt = ARRAY_SIZE(hpd_clk_names);
Rob Clarkc8afe682013-06-26 12:44:06 -0400384 config.ddc_clk_gpio = 170;
385 config.ddc_data_gpio = 171;
386 config.hpd_gpio = 172;
Rob Clarkdada25b2013-12-01 12:12:54 -0500387 config.mux_en_gpio = -1;
388 config.mux_sel_gpio = -1;
Rob Clarkc8afe682013-06-26 12:44:06 -0400389 }
390#endif
Rob Clark060530f2014-03-03 14:19:12 -0500391 dev->platform_data = &config;
Rob Clark067fef32014-11-04 13:33:14 -0500392 hdmi = hdmi_init(to_platform_device(dev));
393 if (IS_ERR(hdmi))
394 return PTR_ERR(hdmi);
395 set_hdmi(dev_get_drvdata(master), hdmi);
Rob Clarkc8afe682013-06-26 12:44:06 -0400396 return 0;
397}
398
Rob Clark060530f2014-03-03 14:19:12 -0500399static void hdmi_unbind(struct device *dev, struct device *master,
400 void *data)
401{
Rob Clark067fef32014-11-04 13:33:14 -0500402 set_hdmi(dev_get_drvdata(master), NULL);
Rob Clark060530f2014-03-03 14:19:12 -0500403}
404
405static const struct component_ops hdmi_ops = {
406 .bind = hdmi_bind,
407 .unbind = hdmi_unbind,
408};
409
410static int hdmi_dev_probe(struct platform_device *pdev)
411{
412 return component_add(&pdev->dev, &hdmi_ops);
413}
414
Rob Clarkc8afe682013-06-26 12:44:06 -0400415static int hdmi_dev_remove(struct platform_device *pdev)
416{
Rob Clark060530f2014-03-03 14:19:12 -0500417 component_del(&pdev->dev, &hdmi_ops);
Rob Clarkc8afe682013-06-26 12:44:06 -0400418 return 0;
419}
420
Rob Clarkdada25b2013-12-01 12:12:54 -0500421static const struct of_device_id dt_match[] = {
Rob Clark41e69772013-12-15 16:23:05 -0500422 { .compatible = "qcom,hdmi-tx-8074" },
423 { .compatible = "qcom,hdmi-tx-8960" },
424 { .compatible = "qcom,hdmi-tx-8660" },
Rob Clarkdada25b2013-12-01 12:12:54 -0500425 {}
426};
Rob Clarkdada25b2013-12-01 12:12:54 -0500427
Rob Clarkc8afe682013-06-26 12:44:06 -0400428static struct platform_driver hdmi_driver = {
429 .probe = hdmi_dev_probe,
430 .remove = hdmi_dev_remove,
Rob Clarkdada25b2013-12-01 12:12:54 -0500431 .driver = {
432 .name = "hdmi_msm",
433 .of_match_table = dt_match,
434 },
Rob Clarkc8afe682013-06-26 12:44:06 -0400435};
436
437void __init hdmi_register(void)
438{
439 platform_driver_register(&hdmi_driver);
440}
441
442void __exit hdmi_unregister(void)
443{
444 platform_driver_unregister(&hdmi_driver);
445}