diff options
author | Thierry Reding <treding@nvidia.com> | 2014-04-29 11:21:21 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-06-05 10:46:40 -0400 |
commit | d02fd93e2cd800fa944bf775ec97deac45fe9923 (patch) | |
tree | ed683cfc390c0e31cf7a79a74c514a50f9eddcdd /drivers/gpu/drm/panel/panel-simple.c | |
parent | 26ab0065794de0317776e97e58364ac30b33f6b2 (diff) |
drm/panel: simple - Disable panel on shutdown
When a device is shut down, disable the panel to make sure the display
backlight doesn't stay lit.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/panel/panel-simple.c')
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a0d3cf11ca15..abae40c58086 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c | |||
@@ -262,6 +262,13 @@ static int panel_simple_remove(struct device *dev) | |||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | 264 | ||
265 | static void panel_simple_shutdown(struct device *dev) | ||
266 | { | ||
267 | struct panel_simple *panel = dev_get_drvdata(dev); | ||
268 | |||
269 | panel_simple_disable(&panel->base); | ||
270 | } | ||
271 | |||
265 | static const struct drm_display_mode auo_b101aw03_mode = { | 272 | static const struct drm_display_mode auo_b101aw03_mode = { |
266 | .clock = 51450, | 273 | .clock = 51450, |
267 | .hdisplay = 1024, | 274 | .hdisplay = 1024, |
@@ -467,6 +474,11 @@ static int panel_simple_platform_remove(struct platform_device *pdev) | |||
467 | return panel_simple_remove(&pdev->dev); | 474 | return panel_simple_remove(&pdev->dev); |
468 | } | 475 | } |
469 | 476 | ||
477 | static void panel_simple_platform_shutdown(struct platform_device *pdev) | ||
478 | { | ||
479 | panel_simple_shutdown(&pdev->dev); | ||
480 | } | ||
481 | |||
470 | static struct platform_driver panel_simple_platform_driver = { | 482 | static struct platform_driver panel_simple_platform_driver = { |
471 | .driver = { | 483 | .driver = { |
472 | .name = "panel-simple", | 484 | .name = "panel-simple", |
@@ -475,6 +487,7 @@ static struct platform_driver panel_simple_platform_driver = { | |||
475 | }, | 487 | }, |
476 | .probe = panel_simple_platform_probe, | 488 | .probe = panel_simple_platform_probe, |
477 | .remove = panel_simple_platform_remove, | 489 | .remove = panel_simple_platform_remove, |
490 | .shutdown = panel_simple_platform_shutdown, | ||
478 | }; | 491 | }; |
479 | 492 | ||
480 | struct panel_desc_dsi { | 493 | struct panel_desc_dsi { |
@@ -616,6 +629,11 @@ static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) | |||
616 | return panel_simple_remove(&dsi->dev); | 629 | return panel_simple_remove(&dsi->dev); |
617 | } | 630 | } |
618 | 631 | ||
632 | static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) | ||
633 | { | ||
634 | panel_simple_shutdown(&dsi->dev); | ||
635 | } | ||
636 | |||
619 | static struct mipi_dsi_driver panel_simple_dsi_driver = { | 637 | static struct mipi_dsi_driver panel_simple_dsi_driver = { |
620 | .driver = { | 638 | .driver = { |
621 | .name = "panel-simple-dsi", | 639 | .name = "panel-simple-dsi", |
@@ -624,6 +642,7 @@ static struct mipi_dsi_driver panel_simple_dsi_driver = { | |||
624 | }, | 642 | }, |
625 | .probe = panel_simple_dsi_probe, | 643 | .probe = panel_simple_dsi_probe, |
626 | .remove = panel_simple_dsi_remove, | 644 | .remove = panel_simple_dsi_remove, |
645 | .shutdown = panel_simple_dsi_shutdown, | ||
627 | }; | 646 | }; |
628 | 647 | ||
629 | static int __init panel_simple_init(void) | 648 | static int __init panel_simple_init(void) |