diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2014-04-06 01:57:15 +0200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-04-06 13:57:14 +0100 |
commit | 4e45cfccb3aed61f5fc5d82bcbed9fdf12cb28bb (patch) | |
tree | 38449020091f14774e5b9cbbe648ab2dc5cf2951 /recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch | |
parent | 1eaeea04d8622d51b89fa37983c1a09ff9f436cf (diff) | |
download | meta-handheld-4e45cfccb3aed61f5fc5d82bcbed9fdf12cb28bb.tar.gz |
linux-yocto: initial commit of version 3.14
* Includes h3600 updates from Linus Walleij <linus.walleij@linaro.org>
* h1940 is currently excluded since it doesn't build with 3.14.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch')
-rw-r--r-- | recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch b/recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch new file mode 100644 index 0000000..a3d63e0 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-3.14/collie/locomolcd-suspend-resume.patch @@ -0,0 +1,92 @@ +From ec4ff55857d5f48d2bf08e46f12eb4670ec6aa1a Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> +Date: Thu, 14 Nov 2013 17:18:26 +0400 +Subject: [PATCH] backlight: locomolcd: fix suspend/resume + +Replace cooked suspend/resume with support from core backlight layer. +This allows us to remove suspend/resume callbacks from locomolcd +completely. They were not working anyway, as locomo does not support +pm_ops handling. + +Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> +--- + drivers/video/backlight/locomolcd.c | 26 +++----------------------- + 1 file changed, 3 insertions(+), 23 deletions(-) + +diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c +index 6c3ec42..54d2da9 100644 +--- a/drivers/video/backlight/locomolcd.c ++++ b/drivers/video/backlight/locomolcd.c +@@ -28,8 +28,6 @@ + + static struct backlight_device *locomolcd_bl_device; + static struct locomo_dev *locomolcd_dev; +-static unsigned long locomolcd_flags; +-#define LOCOMOLCD_SUSPENDED 0x01 + + static void locomolcd_on(int comadj) + { +@@ -117,7 +115,7 @@ static int locomolcd_set_intensity(struct backlight_device *bd) + intensity = 0; + if (bd->props.fb_blank != FB_BLANK_UNBLANK) + intensity = 0; +- if (locomolcd_flags & LOCOMOLCD_SUSPENDED) ++ if (bd->props.state & BL_CORE_SUSPENDED) + intensity = 0; + + switch (intensity) { +@@ -155,26 +153,9 @@ static int locomolcd_get_intensity(struct backlight_device *bd) + static const struct backlight_ops locomobl_data = { + .get_brightness = locomolcd_get_intensity, + .update_status = locomolcd_set_intensity, ++ .options = BL_CORE_SUSPENDRESUME, + }; + +-#ifdef CONFIG_PM_SLEEP +-static int locomolcd_suspend(struct device *dev) +-{ +- locomolcd_flags |= LOCOMOLCD_SUSPENDED; +- locomolcd_set_intensity(locomolcd_bl_device); +- return 0; +-} +- +-static int locomolcd_resume(struct device *dev) +-{ +- locomolcd_flags &= ~LOCOMOLCD_SUSPENDED; +- locomolcd_set_intensity(locomolcd_bl_device); +- return 0; +-} +-#endif +- +-static SIMPLE_DEV_PM_OPS(locomolcd_pm_ops, locomolcd_suspend, locomolcd_resume); +- + static int locomolcd_probe(struct locomo_dev *ldev) + { + struct backlight_properties props; +@@ -198,6 +179,7 @@ static int locomolcd_probe(struct locomo_dev *ldev) + memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_RAW; + props.max_brightness = 4; ++ props.brightness = 2; + locomolcd_bl_device = backlight_device_register("locomo-bl", + &ldev->dev, NULL, + &locomobl_data, &props); +@@ -206,7 +188,6 @@ static int locomolcd_probe(struct locomo_dev *ldev) + return PTR_ERR(locomolcd_bl_device); + + /* Set up frontlight so that screen is readable */ +- locomolcd_bl_device->props.brightness = 2; + locomolcd_set_intensity(locomolcd_bl_device); + + return 0; +@@ -230,7 +211,6 @@ static int locomolcd_remove(struct locomo_dev *dev) + static struct locomo_driver poodle_lcd_driver = { + .drv = { + .name = "locomo-backlight", +- .pm = &locomolcd_pm_ops, + }, + .devid = LOCOMO_DEVID_BACKLIGHT, + .probe = locomolcd_probe, +-- +1.8.4.2 + |