aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSylwester Nawrocki <sylvester.nawrocki@gmail.com>2013-10-16 12:28:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 16:48:08 -0400
commit7e0be9f9f7cba3356f75b86737dbe3a005da067e (patch)
treec74a9b404d878545c57fc190455ab93c03b55909 /drivers/video
parentf1468a2077e8c00fddb6cecec41b356637195ca3 (diff)
video: exynos_mipi_dsim: Use the generic PHY driver
Use the generic PHY API instead of the platform callback for the MIPI DSIM DPHY enable/reset control. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Donghwa Lee <dh09.lee@samsung.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/exynos/Kconfig1
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi.c19
2 files changed, 11 insertions, 9 deletions
diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig
index 1b035b2eb6b6..976594d578a9 100644
--- a/drivers/video/exynos/Kconfig
+++ b/drivers/video/exynos/Kconfig
@@ -16,6 +16,7 @@ if EXYNOS_VIDEO
16config EXYNOS_MIPI_DSI 16config EXYNOS_MIPI_DSI
17 bool "EXYNOS MIPI DSI driver support." 17 bool "EXYNOS MIPI DSI driver support."
18 depends on ARCH_S5PV210 || ARCH_EXYNOS 18 depends on ARCH_S5PV210 || ARCH_EXYNOS
19 select GENERIC_PHY
19 help 20 help
20 This enables support for MIPI-DSI device. 21 This enables support for MIPI-DSI device.
21 22
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index 32e540600f99..00b3a52c1d68 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -30,6 +30,7 @@
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/kthread.h> 31#include <linux/kthread.h>
32#include <linux/notifier.h> 32#include <linux/notifier.h>
33#include <linux/phy/phy.h>
33#include <linux/regulator/consumer.h> 34#include <linux/regulator/consumer.h>
34#include <linux/pm_runtime.h> 35#include <linux/pm_runtime.h>
35#include <linux/err.h> 36#include <linux/err.h>
@@ -156,8 +157,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
156 exynos_mipi_regulator_enable(dsim); 157 exynos_mipi_regulator_enable(dsim);
157 158
158 /* enable MIPI-DSI PHY. */ 159 /* enable MIPI-DSI PHY. */
159 if (dsim->pd->phy_enable) 160 phy_power_on(dsim->phy);
160 dsim->pd->phy_enable(pdev, true);
161 161
162 clk_enable(dsim->clock); 162 clk_enable(dsim->clock);
163 163
@@ -373,6 +373,10 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev)
373 return ret; 373 return ret;
374 } 374 }
375 375
376 dsim->phy = devm_phy_get(&pdev->dev, "dsim");
377 if (IS_ERR(dsim->phy))
378 return PTR_ERR(dsim->phy);
379
376 dsim->clock = devm_clk_get(&pdev->dev, "dsim0"); 380 dsim->clock = devm_clk_get(&pdev->dev, "dsim0");
377 if (IS_ERR(dsim->clock)) { 381 if (IS_ERR(dsim->clock)) {
378 dev_err(&pdev->dev, "failed to get dsim clock source\n"); 382 dev_err(&pdev->dev, "failed to get dsim clock source\n");
@@ -439,8 +443,7 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev)
439 exynos_mipi_regulator_enable(dsim); 443 exynos_mipi_regulator_enable(dsim);
440 444
441 /* enable MIPI-DSI PHY. */ 445 /* enable MIPI-DSI PHY. */
442 if (dsim->pd->phy_enable) 446 phy_power_on(dsim->phy);
443 dsim->pd->phy_enable(pdev, true);
444 447
445 exynos_mipi_update_cfg(dsim); 448 exynos_mipi_update_cfg(dsim);
446 449
@@ -504,9 +507,8 @@ static int exynos_mipi_dsi_suspend(struct device *dev)
504 if (client_drv && client_drv->suspend) 507 if (client_drv && client_drv->suspend)
505 client_drv->suspend(client_dev); 508 client_drv->suspend(client_dev);
506 509
507 /* enable MIPI-DSI PHY. */ 510 /* disable MIPI-DSI PHY. */
508 if (dsim->pd->phy_enable) 511 phy_power_off(dsim->phy);
509 dsim->pd->phy_enable(pdev, false);
510 512
511 clk_disable(dsim->clock); 513 clk_disable(dsim->clock);
512 514
@@ -536,8 +538,7 @@ static int exynos_mipi_dsi_resume(struct device *dev)
536 exynos_mipi_regulator_enable(dsim); 538 exynos_mipi_regulator_enable(dsim);
537 539
538 /* enable MIPI-DSI PHY. */ 540 /* enable MIPI-DSI PHY. */
539 if (dsim->pd->phy_enable) 541 phy_power_on(dsim->phy);
540 dsim->pd->phy_enable(pdev, true);
541 542
542 clk_enable(dsim->clock); 543 clk_enable(dsim->clock);
543 544