MLK-14362-2 backlight: gpio_backlight: add power management ops
authorFancy Fang <chen.fang@nxp.com>
Fri, 10 Mar 2017 02:22:27 +0000 (10:22 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:57 +0000 (15:21 -0500)
Add suspend/resume power management operations for
gpio backlight.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
drivers/video/backlight/gpio_backlight.c

index 1813441..e3f08fe 100644 (file)
@@ -154,10 +154,26 @@ static struct of_device_id gpio_backlight_of_match[] = {
 MODULE_DEVICE_TABLE(of, gpio_backlight_of_match);
 #endif
 
+static int gpio_backlight_suspend(struct device *dev)
+{
+       return 0;
+}
+
+static int gpio_backlight_resume(struct device *dev)
+{
+       return 0;
+}
+
+static const struct dev_pm_ops mipi_dsi_pm_ops = {
+       .suspend = gpio_backlight_suspend,
+       .resume  = gpio_backlight_resume,
+};
+
 static struct platform_driver gpio_backlight_driver = {
        .driver         = {
                .name           = "gpio-backlight",
                .of_match_table = of_match_ptr(gpio_backlight_of_match),
+               .pm = &mipi_dsi_pm_ops,
        },
        .probe          = gpio_backlight_probe,
 };