linux-sg2042/drivers/pwm
David Wu a900152b5c pwm: rockchip: State of PWM clock should synchronize with PWM enabled state
If the PWM was not enabled at U-Boot loader, PWM could not work for
clock always disabled at PWM driver. The PWM clock is enabled at
beginning of pwm_apply(), but disabled at end of pwm_apply().

If the PWM was enabled at U-Boot loader, PWM clock is always enabled
unless closed by ATF. The pwm-backlight might turn off the power at
early suspend, should disable PWM clock for saving power consume.

It is important to provide opportunity to enable/disable clock at PWM
driver, the PWM consumer should ensure correct order to call PWM enable
and disable, and PWM driver ensure state of PWM clock synchronized with
PWM enabled state.

Fixes: 2bf1c98aa5 ("pwm: rockchip: Add support for atomic update")
Cc: stable@vger.kernel.org
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2017-04-06 15:08:52 +02:00
..
Kconfig pwm: Changes for v4.11-rc1 2017-03-01 09:46:02 -08:00
Makefile pwm: Add driver for STM32 plaftorm 2017-01-25 16:11:55 +00:00
core.c pwm: Try to load modules during pwm_get() 2017-01-30 09:36:42 +01:00
pwm-ab8500.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-atmel-hlcdc.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-atmel-tcb.c misc: atmel_tclib: get and use slow clock 2015-10-06 12:33:14 +02:00
pwm-atmel.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-bcm-iproc.c pwm: Add support for Broadcom iProc PWM controller 2016-07-11 12:49:25 +02:00
pwm-bcm-kona.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-bcm2835.c pwm: bcm2835: Fix email address specification 2015-12-16 16:45:32 +01:00
pwm-berlin.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-bfin.c pwm: constify pwm_ops structures 2017-01-19 00:38:17 +01:00
pwm-brcmstb.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-clps711x.c pwm: clps711x: Changing the compatibility string to match with the smallest supported chip 2016-07-06 17:38:17 +02:00
pwm-crc.c pwm: Use pwm_get/set_xxx() helpers where appropriate 2016-05-17 14:44:59 +02:00
pwm-cros-ec.c pwm: cros-ec: Add __packed to prevent padding 2016-09-06 10:48:54 +02:00
pwm-ep93xx.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-fsl-ftm.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-hibvt.c pwm: Add PWM driver for HiSilicon BVT SOCs 2016-11-29 16:50:12 +01:00
pwm-img.c pwm: img: Test clock rate to avoid division by 0 2016-03-23 17:11:02 +01:00
pwm-imx.c Merge branch 'for-4.11/drivers' into for-next 2017-02-10 15:15:56 +01:00
pwm-jz4740.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-lp3943.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-lpc18xx-sct.c pwm: lpc-18xx: use pwm_set_chip_data 2016-09-08 10:55:05 +02:00
pwm-lpc32xx.c pwm: lpc32xx: Set PWM_PIN_LEVEL bit to default value 2016-07-11 12:49:29 +02:00
pwm-lpss-pci.c pwm: lpss: Set enable-bit before waiting for update-bit to go low 2017-04-06 14:48:14 +02:00
pwm-lpss-platform.c pwm: lpss: Set enable-bit before waiting for update-bit to go low 2017-04-06 14:48:14 +02:00
pwm-lpss.c pwm: lpss: Set enable-bit before waiting for update-bit to go low 2017-04-06 14:48:14 +02:00
pwm-lpss.h pwm: lpss: Set enable-bit before waiting for update-bit to go low 2017-04-06 14:48:14 +02:00
pwm-meson.c pwm: Changes for v4.10-rc1 2016-12-15 11:45:13 -08:00
pwm-mtk-disp.c pwm: Add MediaTek MT2701 display PWM driver support 2016-09-06 10:48:53 +02:00
pwm-mxs.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-omap-dmtimer.c pwm: omap-dmtimer: Allow for setting dmtimer clock source 2016-06-29 21:54:00 -07:00
pwm-pca9685.c Merge branch 'for-4.11/drivers' into for-next 2017-02-10 15:15:56 +01:00
pwm-puv3.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-pxa.c pwm: constify pwm_ops structures 2017-01-19 00:38:17 +01:00
pwm-rcar.c pwm: rcar: Make use of pwm_is_enabled() 2016-05-17 14:44:57 +02:00
pwm-renesas-tpu.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-rockchip.c pwm: rockchip: State of PWM clock should synchronize with PWM enabled state 2017-04-06 15:08:52 +02:00
pwm-samsung.c pwm: samsung: Fix to use lowest div for large enough modulation bits 2016-09-06 10:48:55 +02:00
pwm-spear.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-sti.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-stm32.c pwm: Add driver for STM32 plaftorm 2017-01-25 16:11:55 +00:00
pwm-stmpe.c pwm: Add a driver for the STMPE PWM 2016-07-11 12:49:29 +02:00
pwm-sun4i.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-tegra.c pwm: tegra: Add support for Tegra186 2016-07-11 12:49:34 +02:00
pwm-tiecap.c pwm: pwm-ti*: Remove support for local clock gating 2016-07-11 12:07:18 +02:00
pwm-tiehrpwm.c pwm: pwm-ti*: Remove support for local clock gating 2016-07-11 12:07:18 +02:00
pwm-tipwmss.c pwm: pwm-tipwmss: Remove all runtime PM gets/puts 2016-09-06 10:48:54 +02:00
pwm-twl-led.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-twl.c pwm: Remove .can_sleep from struct pwm_chip 2017-01-04 09:40:54 +01:00
pwm-vt8500.c pwm: constify pwm_ops structures 2017-01-19 00:38:17 +01:00
sysfs.c pwm: Fix device reference leak 2016-11-29 16:43:24 +01:00