hdmi.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2014 The Linux Foundation. All rights reserved.
  4. * Copyright (C) 2013 Red Hat
  5. * Author: Rob Clark <[email protected]>
  6. */
  7. #include <linux/of_irq.h>
  8. #include <linux/of_gpio.h>
  9. #include <drm/drm_bridge_connector.h>
  10. #include <drm/drm_of.h>
  11. #include <sound/hdmi-codec.h>
  12. #include "hdmi.h"
  13. void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on)
  14. {
  15. uint32_t ctrl = 0;
  16. unsigned long flags;
  17. spin_lock_irqsave(&hdmi->reg_lock, flags);
  18. if (power_on) {
  19. ctrl |= HDMI_CTRL_ENABLE;
  20. if (!hdmi->hdmi_mode) {
  21. ctrl |= HDMI_CTRL_HDMI;
  22. hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
  23. ctrl &= ~HDMI_CTRL_HDMI;
  24. } else {
  25. ctrl |= HDMI_CTRL_HDMI;
  26. }
  27. } else {
  28. ctrl = HDMI_CTRL_HDMI;
  29. }
  30. hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
  31. spin_unlock_irqrestore(&hdmi->reg_lock, flags);
  32. DBG("HDMI Core: %s, HDMI_CTRL=0x%08x",
  33. power_on ? "Enable" : "Disable", ctrl);
  34. }
  35. static irqreturn_t msm_hdmi_irq(int irq, void *dev_id)
  36. {
  37. struct hdmi *hdmi = dev_id;
  38. /* Process HPD: */
  39. msm_hdmi_hpd_irq(hdmi->bridge);
  40. /* Process DDC: */
  41. msm_hdmi_i2c_irq(hdmi->i2c);
  42. /* Process HDCP: */
  43. if (hdmi->hdcp_ctrl)
  44. msm_hdmi_hdcp_irq(hdmi->hdcp_ctrl);
  45. /* TODO audio.. */
  46. return IRQ_HANDLED;
  47. }
  48. static void msm_hdmi_destroy(struct hdmi *hdmi)
  49. {
  50. /*
  51. * at this point, hpd has been disabled,
  52. * after flush workq, it's safe to deinit hdcp
  53. */
  54. if (hdmi->workq)
  55. destroy_workqueue(hdmi->workq);
  56. msm_hdmi_hdcp_destroy(hdmi);
  57. if (hdmi->phy_dev) {
  58. put_device(hdmi->phy_dev);
  59. hdmi->phy = NULL;
  60. hdmi->phy_dev = NULL;
  61. }
  62. if (hdmi->i2c)
  63. msm_hdmi_i2c_destroy(hdmi->i2c);
  64. platform_set_drvdata(hdmi->pdev, NULL);
  65. }
  66. static int msm_hdmi_get_phy(struct hdmi *hdmi)
  67. {
  68. struct platform_device *pdev = hdmi->pdev;
  69. struct platform_device *phy_pdev;
  70. struct device_node *phy_node;
  71. phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0);
  72. if (!phy_node) {
  73. DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n");
  74. return -ENXIO;
  75. }
  76. phy_pdev = of_find_device_by_node(phy_node);
  77. if (phy_pdev)
  78. hdmi->phy = platform_get_drvdata(phy_pdev);
  79. of_node_put(phy_node);
  80. if (!phy_pdev) {
  81. DRM_DEV_ERROR(&pdev->dev, "phy driver is not ready\n");
  82. return -EPROBE_DEFER;
  83. }
  84. if (!hdmi->phy) {
  85. DRM_DEV_ERROR(&pdev->dev, "phy driver is not ready\n");
  86. put_device(&phy_pdev->dev);
  87. return -EPROBE_DEFER;
  88. }
  89. hdmi->phy_dev = get_device(&phy_pdev->dev);
  90. return 0;
  91. }
  92. /* construct hdmi at bind/probe time, grab all the resources. If
  93. * we are to EPROBE_DEFER we want to do it here, rather than later
  94. * at modeset_init() time
  95. */
  96. static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
  97. {
  98. struct hdmi_platform_config *config = pdev->dev.platform_data;
  99. struct hdmi *hdmi = NULL;
  100. struct resource *res;
  101. int i, ret;
  102. hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
  103. if (!hdmi) {
  104. ret = -ENOMEM;
  105. goto fail;
  106. }
  107. hdmi->pdev = pdev;
  108. hdmi->config = config;
  109. spin_lock_init(&hdmi->reg_lock);
  110. ret = drm_of_find_panel_or_bridge(pdev->dev.of_node, 1, 0, NULL, &hdmi->next_bridge);
  111. if (ret && ret != -ENODEV)
  112. goto fail;
  113. hdmi->mmio = msm_ioremap(pdev, config->mmio_name);
  114. if (IS_ERR(hdmi->mmio)) {
  115. ret = PTR_ERR(hdmi->mmio);
  116. goto fail;
  117. }
  118. /* HDCP needs physical address of hdmi register */
  119. res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
  120. config->mmio_name);
  121. if (!res) {
  122. ret = -EINVAL;
  123. goto fail;
  124. }
  125. hdmi->mmio_phy_addr = res->start;
  126. hdmi->qfprom_mmio = msm_ioremap(pdev, config->qfprom_mmio_name);
  127. if (IS_ERR(hdmi->qfprom_mmio)) {
  128. DRM_DEV_INFO(&pdev->dev, "can't find qfprom resource\n");
  129. hdmi->qfprom_mmio = NULL;
  130. }
  131. hdmi->hpd_regs = devm_kcalloc(&pdev->dev,
  132. config->hpd_reg_cnt,
  133. sizeof(hdmi->hpd_regs[0]),
  134. GFP_KERNEL);
  135. if (!hdmi->hpd_regs) {
  136. ret = -ENOMEM;
  137. goto fail;
  138. }
  139. for (i = 0; i < config->hpd_reg_cnt; i++)
  140. hdmi->hpd_regs[i].supply = config->hpd_reg_names[i];
  141. ret = devm_regulator_bulk_get(&pdev->dev, config->hpd_reg_cnt, hdmi->hpd_regs);
  142. if (ret) {
  143. DRM_DEV_ERROR(&pdev->dev, "failed to get hpd regulator: %d\n", ret);
  144. goto fail;
  145. }
  146. hdmi->pwr_regs = devm_kcalloc(&pdev->dev,
  147. config->pwr_reg_cnt,
  148. sizeof(hdmi->pwr_regs[0]),
  149. GFP_KERNEL);
  150. if (!hdmi->pwr_regs) {
  151. ret = -ENOMEM;
  152. goto fail;
  153. }
  154. for (i = 0; i < config->pwr_reg_cnt; i++)
  155. hdmi->pwr_regs[i].supply = config->pwr_reg_names[i];
  156. ret = devm_regulator_bulk_get(&pdev->dev, config->pwr_reg_cnt, hdmi->pwr_regs);
  157. if (ret) {
  158. DRM_DEV_ERROR(&pdev->dev, "failed to get pwr regulator: %d\n", ret);
  159. goto fail;
  160. }
  161. hdmi->hpd_clks = devm_kcalloc(&pdev->dev,
  162. config->hpd_clk_cnt,
  163. sizeof(hdmi->hpd_clks[0]),
  164. GFP_KERNEL);
  165. if (!hdmi->hpd_clks) {
  166. ret = -ENOMEM;
  167. goto fail;
  168. }
  169. for (i = 0; i < config->hpd_clk_cnt; i++) {
  170. struct clk *clk;
  171. clk = msm_clk_get(pdev, config->hpd_clk_names[i]);
  172. if (IS_ERR(clk)) {
  173. ret = PTR_ERR(clk);
  174. DRM_DEV_ERROR(&pdev->dev, "failed to get hpd clk: %s (%d)\n",
  175. config->hpd_clk_names[i], ret);
  176. goto fail;
  177. }
  178. hdmi->hpd_clks[i] = clk;
  179. }
  180. hdmi->pwr_clks = devm_kcalloc(&pdev->dev,
  181. config->pwr_clk_cnt,
  182. sizeof(hdmi->pwr_clks[0]),
  183. GFP_KERNEL);
  184. if (!hdmi->pwr_clks) {
  185. ret = -ENOMEM;
  186. goto fail;
  187. }
  188. for (i = 0; i < config->pwr_clk_cnt; i++) {
  189. struct clk *clk;
  190. clk = msm_clk_get(pdev, config->pwr_clk_names[i]);
  191. if (IS_ERR(clk)) {
  192. ret = PTR_ERR(clk);
  193. DRM_DEV_ERROR(&pdev->dev, "failed to get pwr clk: %s (%d)\n",
  194. config->pwr_clk_names[i], ret);
  195. goto fail;
  196. }
  197. hdmi->pwr_clks[i] = clk;
  198. }
  199. hdmi->hpd_gpiod = devm_gpiod_get_optional(&pdev->dev, "hpd", GPIOD_IN);
  200. /* This will catch e.g. -EPROBE_DEFER */
  201. if (IS_ERR(hdmi->hpd_gpiod)) {
  202. ret = PTR_ERR(hdmi->hpd_gpiod);
  203. DRM_DEV_ERROR(&pdev->dev, "failed to get hpd gpio: (%d)\n", ret);
  204. goto fail;
  205. }
  206. if (!hdmi->hpd_gpiod)
  207. DBG("failed to get HPD gpio");
  208. if (hdmi->hpd_gpiod)
  209. gpiod_set_consumer_name(hdmi->hpd_gpiod, "HDMI_HPD");
  210. devm_pm_runtime_enable(&pdev->dev);
  211. hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0);
  212. if (!hdmi->workq) {
  213. ret = -ENOMEM;
  214. goto fail;
  215. }
  216. hdmi->i2c = msm_hdmi_i2c_init(hdmi);
  217. if (IS_ERR(hdmi->i2c)) {
  218. ret = PTR_ERR(hdmi->i2c);
  219. DRM_DEV_ERROR(&pdev->dev, "failed to get i2c: %d\n", ret);
  220. hdmi->i2c = NULL;
  221. goto fail;
  222. }
  223. ret = msm_hdmi_get_phy(hdmi);
  224. if (ret) {
  225. DRM_DEV_ERROR(&pdev->dev, "failed to get phy\n");
  226. goto fail;
  227. }
  228. hdmi->hdcp_ctrl = msm_hdmi_hdcp_init(hdmi);
  229. if (IS_ERR(hdmi->hdcp_ctrl)) {
  230. dev_warn(&pdev->dev, "failed to init hdcp: disabled\n");
  231. hdmi->hdcp_ctrl = NULL;
  232. }
  233. return hdmi;
  234. fail:
  235. if (hdmi)
  236. msm_hdmi_destroy(hdmi);
  237. return ERR_PTR(ret);
  238. }
  239. /* Second part of initialization, the drm/kms level modeset_init,
  240. * constructs/initializes mode objects, etc, is called from master
  241. * driver (not hdmi sub-device's probe/bind!)
  242. *
  243. * Any resource (regulator/clk/etc) which could be missing at boot
  244. * should be handled in msm_hdmi_init() so that failure happens from
  245. * hdmi sub-device's probe.
  246. */
  247. int msm_hdmi_modeset_init(struct hdmi *hdmi,
  248. struct drm_device *dev, struct drm_encoder *encoder)
  249. {
  250. struct msm_drm_private *priv = dev->dev_private;
  251. struct platform_device *pdev = hdmi->pdev;
  252. int ret;
  253. if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) {
  254. DRM_DEV_ERROR(dev->dev, "too many bridges\n");
  255. return -ENOSPC;
  256. }
  257. hdmi->dev = dev;
  258. hdmi->encoder = encoder;
  259. hdmi_audio_infoframe_init(&hdmi->audio.infoframe);
  260. hdmi->bridge = msm_hdmi_bridge_init(hdmi);
  261. if (IS_ERR(hdmi->bridge)) {
  262. ret = PTR_ERR(hdmi->bridge);
  263. DRM_DEV_ERROR(dev->dev, "failed to create HDMI bridge: %d\n", ret);
  264. hdmi->bridge = NULL;
  265. goto fail;
  266. }
  267. if (hdmi->next_bridge) {
  268. ret = drm_bridge_attach(hdmi->encoder, hdmi->next_bridge, hdmi->bridge,
  269. DRM_BRIDGE_ATTACH_NO_CONNECTOR);
  270. if (ret) {
  271. DRM_DEV_ERROR(dev->dev, "failed to attach next HDMI bridge: %d\n", ret);
  272. goto fail;
  273. }
  274. }
  275. hdmi->connector = drm_bridge_connector_init(hdmi->dev, encoder);
  276. if (IS_ERR(hdmi->connector)) {
  277. ret = PTR_ERR(hdmi->connector);
  278. DRM_DEV_ERROR(dev->dev, "failed to create HDMI connector: %d\n", ret);
  279. hdmi->connector = NULL;
  280. goto fail;
  281. }
  282. drm_connector_attach_encoder(hdmi->connector, hdmi->encoder);
  283. hdmi->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
  284. if (!hdmi->irq) {
  285. ret = -EINVAL;
  286. DRM_DEV_ERROR(dev->dev, "failed to get irq\n");
  287. goto fail;
  288. }
  289. ret = devm_request_irq(dev->dev, hdmi->irq,
  290. msm_hdmi_irq, IRQF_TRIGGER_HIGH,
  291. "hdmi_isr", hdmi);
  292. if (ret < 0) {
  293. DRM_DEV_ERROR(dev->dev, "failed to request IRQ%u: %d\n",
  294. hdmi->irq, ret);
  295. goto fail;
  296. }
  297. drm_bridge_connector_enable_hpd(hdmi->connector);
  298. ret = msm_hdmi_hpd_enable(hdmi->bridge);
  299. if (ret < 0) {
  300. DRM_DEV_ERROR(&hdmi->pdev->dev, "failed to enable HPD: %d\n", ret);
  301. goto fail;
  302. }
  303. priv->bridges[priv->num_bridges++] = hdmi->bridge;
  304. platform_set_drvdata(pdev, hdmi);
  305. return 0;
  306. fail:
  307. /* bridge is normally destroyed by drm: */
  308. if (hdmi->bridge) {
  309. msm_hdmi_bridge_destroy(hdmi->bridge);
  310. hdmi->bridge = NULL;
  311. }
  312. if (hdmi->connector) {
  313. hdmi->connector->funcs->destroy(hdmi->connector);
  314. hdmi->connector = NULL;
  315. }
  316. return ret;
  317. }
  318. /*
  319. * The hdmi device:
  320. */
  321. #define HDMI_CFG(item, entry) \
  322. .item ## _names = item ##_names_ ## entry, \
  323. .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry)
  324. static const char *hpd_reg_names_8960[] = {"core-vdda"};
  325. static const char *hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
  326. static struct hdmi_platform_config hdmi_tx_8960_config = {
  327. HDMI_CFG(hpd_reg, 8960),
  328. HDMI_CFG(hpd_clk, 8960),
  329. };
  330. static const char *pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"};
  331. static const char *pwr_clk_names_8x74[] = {"extp", "alt_iface"};
  332. static const char *hpd_clk_names_8x74[] = {"iface", "core", "mdp_core"};
  333. static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0};
  334. static struct hdmi_platform_config hdmi_tx_8974_config = {
  335. HDMI_CFG(pwr_reg, 8x74),
  336. HDMI_CFG(pwr_clk, 8x74),
  337. HDMI_CFG(hpd_clk, 8x74),
  338. .hpd_freq = hpd_clk_freq_8x74,
  339. };
  340. /*
  341. * HDMI audio codec callbacks
  342. */
  343. static int msm_hdmi_audio_hw_params(struct device *dev, void *data,
  344. struct hdmi_codec_daifmt *daifmt,
  345. struct hdmi_codec_params *params)
  346. {
  347. struct hdmi *hdmi = dev_get_drvdata(dev);
  348. unsigned int chan;
  349. unsigned int channel_allocation = 0;
  350. unsigned int rate;
  351. unsigned int level_shift = 0; /* 0dB */
  352. bool down_mix = false;
  353. DRM_DEV_DEBUG(dev, "%u Hz, %d bit, %d channels\n", params->sample_rate,
  354. params->sample_width, params->cea.channels);
  355. switch (params->cea.channels) {
  356. case 2:
  357. /* FR and FL speakers */
  358. channel_allocation = 0;
  359. chan = MSM_HDMI_AUDIO_CHANNEL_2;
  360. break;
  361. case 4:
  362. /* FC, LFE, FR and FL speakers */
  363. channel_allocation = 0x3;
  364. chan = MSM_HDMI_AUDIO_CHANNEL_4;
  365. break;
  366. case 6:
  367. /* RR, RL, FC, LFE, FR and FL speakers */
  368. channel_allocation = 0x0B;
  369. chan = MSM_HDMI_AUDIO_CHANNEL_6;
  370. break;
  371. case 8:
  372. /* FRC, FLC, RR, RL, FC, LFE, FR and FL speakers */
  373. channel_allocation = 0x1F;
  374. chan = MSM_HDMI_AUDIO_CHANNEL_8;
  375. break;
  376. default:
  377. return -EINVAL;
  378. }
  379. switch (params->sample_rate) {
  380. case 32000:
  381. rate = HDMI_SAMPLE_RATE_32KHZ;
  382. break;
  383. case 44100:
  384. rate = HDMI_SAMPLE_RATE_44_1KHZ;
  385. break;
  386. case 48000:
  387. rate = HDMI_SAMPLE_RATE_48KHZ;
  388. break;
  389. case 88200:
  390. rate = HDMI_SAMPLE_RATE_88_2KHZ;
  391. break;
  392. case 96000:
  393. rate = HDMI_SAMPLE_RATE_96KHZ;
  394. break;
  395. case 176400:
  396. rate = HDMI_SAMPLE_RATE_176_4KHZ;
  397. break;
  398. case 192000:
  399. rate = HDMI_SAMPLE_RATE_192KHZ;
  400. break;
  401. default:
  402. DRM_DEV_ERROR(dev, "rate[%d] not supported!\n",
  403. params->sample_rate);
  404. return -EINVAL;
  405. }
  406. msm_hdmi_audio_set_sample_rate(hdmi, rate);
  407. msm_hdmi_audio_info_setup(hdmi, 1, chan, channel_allocation,
  408. level_shift, down_mix);
  409. return 0;
  410. }
  411. static void msm_hdmi_audio_shutdown(struct device *dev, void *data)
  412. {
  413. struct hdmi *hdmi = dev_get_drvdata(dev);
  414. msm_hdmi_audio_info_setup(hdmi, 0, 0, 0, 0, 0);
  415. }
  416. static const struct hdmi_codec_ops msm_hdmi_audio_codec_ops = {
  417. .hw_params = msm_hdmi_audio_hw_params,
  418. .audio_shutdown = msm_hdmi_audio_shutdown,
  419. };
  420. static struct hdmi_codec_pdata codec_data = {
  421. .ops = &msm_hdmi_audio_codec_ops,
  422. .max_i2s_channels = 8,
  423. .i2s = 1,
  424. };
  425. static int msm_hdmi_register_audio_driver(struct hdmi *hdmi, struct device *dev)
  426. {
  427. hdmi->audio_pdev = platform_device_register_data(dev,
  428. HDMI_CODEC_DRV_NAME,
  429. PLATFORM_DEVID_AUTO,
  430. &codec_data,
  431. sizeof(codec_data));
  432. return PTR_ERR_OR_ZERO(hdmi->audio_pdev);
  433. }
  434. static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)
  435. {
  436. struct msm_drm_private *priv = dev_get_drvdata(master);
  437. struct hdmi_platform_config *hdmi_cfg;
  438. struct hdmi *hdmi;
  439. struct device_node *of_node = dev->of_node;
  440. int err;
  441. hdmi_cfg = (struct hdmi_platform_config *)
  442. of_device_get_match_data(dev);
  443. if (!hdmi_cfg) {
  444. DRM_DEV_ERROR(dev, "unknown hdmi_cfg: %pOFn\n", of_node);
  445. return -ENXIO;
  446. }
  447. hdmi_cfg->mmio_name = "core_physical";
  448. hdmi_cfg->qfprom_mmio_name = "qfprom_physical";
  449. dev->platform_data = hdmi_cfg;
  450. hdmi = msm_hdmi_init(to_platform_device(dev));
  451. if (IS_ERR(hdmi))
  452. return PTR_ERR(hdmi);
  453. priv->hdmi = hdmi;
  454. err = msm_hdmi_register_audio_driver(hdmi, dev);
  455. if (err) {
  456. DRM_ERROR("Failed to attach an audio codec %d\n", err);
  457. hdmi->audio_pdev = NULL;
  458. }
  459. return 0;
  460. }
  461. static void msm_hdmi_unbind(struct device *dev, struct device *master,
  462. void *data)
  463. {
  464. struct msm_drm_private *priv = dev_get_drvdata(master);
  465. if (priv->hdmi) {
  466. if (priv->hdmi->audio_pdev)
  467. platform_device_unregister(priv->hdmi->audio_pdev);
  468. msm_hdmi_destroy(priv->hdmi);
  469. priv->hdmi = NULL;
  470. }
  471. }
  472. static const struct component_ops msm_hdmi_ops = {
  473. .bind = msm_hdmi_bind,
  474. .unbind = msm_hdmi_unbind,
  475. };
  476. static int msm_hdmi_dev_probe(struct platform_device *pdev)
  477. {
  478. return component_add(&pdev->dev, &msm_hdmi_ops);
  479. }
  480. static int msm_hdmi_dev_remove(struct platform_device *pdev)
  481. {
  482. component_del(&pdev->dev, &msm_hdmi_ops);
  483. return 0;
  484. }
  485. static const struct of_device_id msm_hdmi_dt_match[] = {
  486. { .compatible = "qcom,hdmi-tx-8996", .data = &hdmi_tx_8974_config },
  487. { .compatible = "qcom,hdmi-tx-8994", .data = &hdmi_tx_8974_config },
  488. { .compatible = "qcom,hdmi-tx-8084", .data = &hdmi_tx_8974_config },
  489. { .compatible = "qcom,hdmi-tx-8974", .data = &hdmi_tx_8974_config },
  490. { .compatible = "qcom,hdmi-tx-8960", .data = &hdmi_tx_8960_config },
  491. { .compatible = "qcom,hdmi-tx-8660", .data = &hdmi_tx_8960_config },
  492. {}
  493. };
  494. static struct platform_driver msm_hdmi_driver = {
  495. .probe = msm_hdmi_dev_probe,
  496. .remove = msm_hdmi_dev_remove,
  497. .driver = {
  498. .name = "hdmi_msm",
  499. .of_match_table = msm_hdmi_dt_match,
  500. },
  501. };
  502. void __init msm_hdmi_register(void)
  503. {
  504. msm_hdmi_phy_driver_register();
  505. platform_driver_register(&msm_hdmi_driver);
  506. }
  507. void __exit msm_hdmi_unregister(void)
  508. {
  509. platform_driver_unregister(&msm_hdmi_driver);
  510. msm_hdmi_phy_driver_unregister();
  511. }