linux-stable/drivers/pwm
Vladimir Zapolskiy 82aff048dd pwm: lpc32xx: make device usable with common clock framework
As a preparatory change for switching LPC32xx mach support to common
clock framework fix clk_enable/clk_disable calls without matching
clk_prepare/clk_unprepare.

The driver can not be used on a platform with common clock framework
until clk_prepare/clk_unprepare calls are added, otherwise clk_enable
calls will fail and a WARN is generated:

    # echo 1 > /sys/bus/platform/drivers/lpc32xx-pwm/4005c000.pwm/pwm/pwmchip0/pwm0/enable
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 701 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
    Modules linked in: sc16is7xx
    CPU: 0 PID: 701 Comm: sh Tainted: G        W       4.3.0-rc2+ #171
    Hardware name: LPC32XX SoC (Flattened Device Tree)
    Backtrace:
    [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
    [<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
    [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
    [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
    [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
    [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
    [<>] (clk_enable) from [<>] (lpc32xx_pwm_enable+0x1c/0x40)
    [<>] (lpc32xx_pwm_enable) from [<>] (pwm_enable+0x48/0x5c)
    [<>] (pwm_enable) from [<>] (pwm_enable_store+0x5c/0x78)
    [<>] (pwm_enable_store) from [<>] (dev_attr_store+0x20/0x2c)
    [<>] (dev_attr_store) from [<>] (sysfs_kf_write+0x44/0x50)
    [<>] (sysfs_kf_write) from [<>] (kernfs_fop_write+0x134/0x194)
    [<>] (kernfs_fop_write) from [<>] (__vfs_write+0x34/0xdc)
    [<>] (__vfs_write) from [<>] (vfs_write+0xb8/0x140)
    [<>] (vfs_write) from [<>] (SyS_write+0x50/0x90)
    [<>] (SyS_write) from [<>] (ret_fast_syscall+0x0/0x38)

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2015-12-16 17:00:33 +01:00
..
core.c pwm: Return -ENODEV if no PWM lookup match is found 2015-11-10 13:06:42 +01:00
Kconfig pwm: lpss: Select core part automatically 2015-12-16 16:50:31 +01:00
Makefile pwm: Add MediaTek display PWM driver support 2015-10-06 16:07:30 +02:00
pwm-ab8500.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-atmel-hlcdc.c pwm: atmel-hlcdc: add sama5d2 SoC support. 2015-10-06 16:07:28 +02: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: Make use of pwm_get_xxx() helpers where appropriate 2015-07-20 09:53:22 +02:00
pwm-bcm-kona.c pwm: kona: Modify settings application sequence 2015-08-17 16:19:41 +02:00
pwm-bcm2835.c pwm: bcm2835: Fix email address specification 2015-12-16 16:45:32 +01:00
pwm-berlin.c pwm: Add support for the Berlin PWM controller 2015-10-06 09:40:44 +02:00
pwm-bfin.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-brcmstb.c pwm: Add Broadcom BCM7038 PWM controller support 2015-10-06 16:07:27 +02:00
pwm-clps711x.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-crc.c pwm: crc: Add Crystalcove (CRC) PWM driver 2015-07-21 09:22:23 +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: fsl-ftm: Fix clock enable/disable when using PM 2015-12-16 16:54:32 +01:00
pwm-img.c pwm: img: Impose upper and lower timebase steps value 2015-05-19 16:07:40 +02:00
pwm-imx.c pwm: Make use of pwm_get_xxx() helpers where appropriate 2015-07-20 09:53:22 +02:00
pwm-jz4740.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-lp3943.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-lpc18xx-sct.c pwm: NXP LPC18xx PWM/SCT driver 2015-09-09 15:00:33 +02:00
pwm-lpc32xx.c pwm: lpc32xx: make device usable with common clock framework 2015-12-16 17:00:33 +01:00
pwm-lpss-pci.c pwm: lpss: Add support for runtime PM 2015-11-06 14:34:13 +01:00
pwm-lpss-platform.c pwm: lpss: Add support for runtime PM 2015-11-06 14:34:13 +01:00
pwm-lpss.c pwm: lpss: Rework the sequence of programming PWM_SW_UPDATE 2015-12-16 16:52:09 +01:00
pwm-lpss.h pwm: lpss: Update PWM setting for Broxton 2015-12-16 16:45:38 +01:00
pwm-mtk-disp.c pwm: Add MediaTek display PWM driver support 2015-10-06 16:07:30 +02:00
pwm-mxs.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-pca9685.c pwm-pca9685: enable ACPI device found on Galileo Gen2 2015-11-06 14:14:19 +01:00
pwm-puv3.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-pxa.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-rcar.c pwm: Add support for R-Car PWM Timer 2015-10-06 09:40:46 +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: Make use of pwm_get_xxx() helpers where appropriate 2015-07-20 09:53:22 +02:00
pwm-samsung.c pwm: samsung: Use MODULE_DEVICE_TABLE() to include OF modalias 2015-05-21 15:56:53 +02:00
pwm-spear.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-sti.c pwm: sti: Maintain a bitmap of configured devices 2015-01-30 12:16:03 +01:00
pwm-sun4i.c pwm: sunxi: Fix whitespace issue 2015-11-10 13:06:47 +01:00
pwm-tegra.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-tiecap.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-tiehrpwm.c pwm: Add the pwm_is_enabled() helper 2015-07-20 09:46:06 +02:00
pwm-tipwmss.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-tipwmss.h pwm: davinci: Add Kconfig support for ECAP & EHRPWM devices 2013-03-22 11:35:20 +01:00
pwm-twl-led.c pwm: twl-led: Include linux/of.h header 2013-10-08 15:45:44 +02:00
pwm-twl.c pwm: twl: Really disable twl6030 PWMs 2014-05-08 23:41:47 +02:00
pwm-vt8500.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
sysfs.c pwm: sysfs: Make use of the DEVICE_ATTR_[RW][WO] macro's 2015-11-10 13:06:46 +01:00