alistair23-linux/drivers/leds
Grygorii Strashko 084609bf72 leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger
Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
hibernation callbacks means those pm functions will not be
called upon hibernation - that leads to system crash on ARM during
freezing if gpio-led is used in combination with CPU led trigger.
It may happen after freeze_noirq stage (GPIO is suspended)
and before syscore_suspend stage (CPU led trigger is suspended)
- usually when disable_nonboot_cpus() is called.

Log:
  PM: noirq freeze of devices complete after 1.425 msecs
  Disabling non-boot CPUs ...
    ^ system may crash or stuck here with message (TI AM572x)

  WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
  44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access

  CPU1: shutdown
    ^ or here

Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
assigns the suspend and hibernation callbacks and move
led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
build warnings.

Fixes: 73e1ab41a8 (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-12 23:58:24 +02:00
..
trigger leds: Add support for setting brightness in a synchronous way 2014-11-14 14:29:35 -08:00
dell-led.c
Kconfig leds: add Qualcomm PM8941 WLED driver 2015-03-30 11:55:49 -07:00
led-class-flash.c leds: flash: Remove synchronized flash strobe feature 2015-03-09 17:16:23 -07:00
led-class.c leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger 2015-05-12 23:58:24 +02:00
led-core.c leds: Add support for setting brightness in a synchronous way 2014-11-14 14:29:35 -08:00
led-triggers.c leds: implement sysfs interface locking mechanism 2014-11-14 14:29:35 -08:00
leds-88pm860x.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-adp5520.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-asic3.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-bd2802.c
leds-blinkm.c
leds-clevo-mail.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-cobalt-qube.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-cobalt-raq.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-da903x.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-da9052.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-dac124s085.c
leds-fsg.c
leds-gpio-register.c led: gpio: Fix possible ZERO_SIZE_PTR pointer dereferencing error. 2014-09-29 10:21:01 -07:00
leds-gpio.c gpio: add parameter to allow the use named gpios 2015-03-04 13:58:58 +01:00
leds-hp6xx.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-ipaq-micro.c
leds-lm355x.c
leds-lm3530.c
leds-lm3533.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-lm3642.c
leds-locomo.c
leds-lp55xx-common.c
leds-lp55xx-common.h
leds-lp3944.c
leds-lp5521.c
leds-lp5523.c
leds-lp5562.c
leds-lp8501.c leds: lp8501: Fix typo in MODULE_DESCRIPTION in leds-lp8501.c 2015-03-30 11:55:51 -07:00
leds-lp8788.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-lp8860.c leds: lp8860: Fix typo in MODULE_DESCRIPTION in leds-lp8860.c 2015-03-30 11:55:51 -07:00
leds-lt3593.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-max8997.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-mc13783.c leds: leds-mc13783: Use of_get_child_by_name() instead of refcount hack 2015-01-14 10:40:20 -08:00
leds-menf21bmc.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-net48xx.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-netxbig.c leds: netxbig: fix oops at probe time 2015-01-13 13:49:01 -08:00
leds-ns2.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-ot200.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-pca955x.c
leds-pca963x.c leds: pca963x: Add missing initialiation of struct led_info.flags 2015-03-30 11:55:48 -07:00
leds-pca9532.c
leds-pm8941-wled.c leds: add Qualcomm PM8941 WLED driver 2015-03-30 11:55:49 -07:00
leds-pwm.c leds: leds-pwm: drop one pwm_get_period() call 2015-02-24 11:42:18 -08:00
leds-rb532.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-regulator.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2014-12-15 18:28:25 -08:00
leds-s3c24xx.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-ss4200.c
leds-sunfire.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-syscon.c leds: syscon: handle multiple syscon instances 2014-11-14 14:29:35 -08:00
leds-tca6507.c
leds-versatile.c
leds-wm831x-status.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-wm8350.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds-wrap.c leds: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
leds.h leds: Don't allow brightness values greater than max_brightness 2015-01-14 10:40:19 -08:00
Makefile leds: add Qualcomm PM8941 WLED driver 2015-03-30 11:55:49 -07:00