drm/rockchip: implement shutdown function

implement shutdown to make sure display will be closed
when box product power off.

Change-Id: I860a768a061082bf35bcd53c7dde153e6109f42d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2018-01-15 11:12:25 +08:00
committed by Tao Huang
parent c1b0a95f96
commit 75f953253b

View File

@@ -1756,6 +1756,13 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
return 0;
}
static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
rockchip_drm_sys_suspend(dev);
}
static const struct of_device_id rockchip_drm_dt_ids[] = {
{ .compatible = "rockchip,display-subsystem", },
{ /* sentinel */ },
@@ -1765,6 +1772,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
static struct platform_driver rockchip_drm_platform_driver = {
.probe = rockchip_drm_platform_probe,
.remove = rockchip_drm_platform_remove,
.shutdown = rockchip_drm_platform_shutdown,
.driver = {
.name = "rockchip-drm",
.of_match_table = rockchip_drm_dt_ids,