18 May, 2013
1 commit
-
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
Acked-by: Stephen Warren
23 Apr, 2013
3 commits
-
lpc32xx_pwm_config() is supposed to set duty_ns and period_ns,
it should not change PWM_ENABLE bit.Signed-off-by: Axel Lin
Tested-by: Roland Stigge
Signed-off-by: Thierry Reding -
According to the LPC32x0 User Manual [1]:
For both PWM1 and PWM2 Control Registers:
BIT 31:
This bit gates the PWM_CLK signal and enables the external output pin
to the PWM_PIN_STATE logical level.0 = PWM disabled. (Default)
1 = PWM enabledSo in lpc32xx_pwm_enable(), we should set PWM_ENABLE bit.
In lpc32xx_pwm_disable(), we should just clear PWM_ENABLE bit rather than
write 0 to the register which will also clear PWMx_RELOADV and PWMx_DUTY bits.[1] http://www.nxp.com/documents/user_manual/UM10326.pdf
Signed-off-by: Axel Lin
Tested-by: Roland Stigge
Signed-off-by: Thierry Reding -
A few drivers already annotate this properly. Make the same change for
all other OF supporting drivers.Signed-off-by: Thierry Reding
Acked-by: Shawn Guo
Acked-by: Alexandre Pereira da Silva
Acked-by: Viresh Kumar
02 Apr, 2013
12 commits
-
Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding -
PWM_ID_BASE() is not used after convert to PWM framework, remove it.
Also update driver_data field of struct platform_device_id accordingly.Signed-off-by: Axel Lin
Acked-by: Eric Miao
Signed-off-by: Thierry Reding -
Signed-off-by: Axel Lin
Acked-by: Shiraz Hashim
Acked-by: Viresh Kumar
Signed-off-by: Thierry Reding -
Signed-off-by: Axel Lin
Acked-by: Shawn Guo
Signed-off-by: Thierry Reding -
Return proper error instead of 0 if twl6030_pwm_enable() fails.
Signed-off-by: Axel Lin
Acked-by: Peter Ujfalusi
Signed-off-by: Thierry Reding -
clk_enable/clk_disable maintain an enable_count, clk_prepare and clk_unprepare
also maintain a prepare_count. These APIs will do prepare/enable when the first
user calling these APIs, and do disable/unprepare when the corresponding counter
reach 0. Thus We don't need to maintain a clk_enabled counter here.Signed-off-by: Axel Lin
Acked-by: Eric Miao
Signed-off-by: Thierry Reding -
We can test PWMF_ENABLED bit to know if pwm is enabled or not.
Thus remove enabled field from struct imx_chip.Signed-off-by: Axel Lin
Acked-by: Sascha Hauer
Signed-off-by: Thierry Reding -
Add missing .owner of struct pwm_ops. This prevents the module from being
removed from underneath its users.Signed-off-by: Axel Lin
Acked-by: Peter Ujfalusi
Signed-off-by: Thierry Reding -
Add missing .owner of struct pwm_ops. This prevents the module from being
removed from underneath its users.Signed-off-by: Axel Lin
Acked-by: Peter Ujfalusi
Signed-off-by: Thierry Reding -
Add missing .owner of struct pwm_ops. This prevents the module from being
removed from underneath its users.Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding -
Add missing .owner of struct pwm_ops. This prevents the module from being
removed from underneath its users.Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding -
The logic to check return value of clk_enable() and clk_prepare() is reversed,
fix it.Signed-off-by: Axel Lin
Cc: stable@vger.kernel.org
Acked-by: Viresh Kumar
Signed-off-by: Thierry Reding
26 Mar, 2013
3 commits
-
Both ehrpwm_pwm_save_context() and ehrpwm_pwm_restore_context() are only used in
this file, make them static.Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding -
Both ecap_pwm_save_context() and ecap_pwm_restore_context() are only used in
this file, make them static.Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding -
Signed-off-by: Axel Lin
Signed-off-by: Thierry Reding
22 Mar, 2013
1 commit
-
Add EHRPWM and ECAP support build support for DAVINCI_DA8XX platforms.
Also, since DAVINCI platforms doesn't support TI-PWM-Subsystem module,
remove the select option for CONFIG_PWM_TIPWMSS.Also, update CONFIG_PWM_TIPWMSS compiler directive appropriately in
pwm-tipwmss.h to fix the below compiler error upon removal of
CONFIG_PWM_TIPWMSS for DAVINCI platforms.drivers/pwm/pwm-tiecap.c: In function 'ecap_pwm_probe':
drivers/pwm/pwm-tiecap.c:263:4: error: 'PWMSS_ECAPCLK_EN' undeclared
(first use in this function)
drivers/pwm/pwm-tiecap.c:263:4: note: each undeclared identifier
is reported only once for each function it appears in
drivers/pwm/pwm-tiecap.c:264:17: error: 'PWMSS_ECAPCLK_EN_ACK'
undeclared (first use in this function)
drivers/pwm/pwm-tiecap.c: In function 'ecap_pwm_remove':
drivers/pwm/pwm-tiecap.c:291:49: error: 'PWMSS_ECAPCLK_STOP_REQ'
undeclared (first use in this function)
make[2]: *** [drivers/pwm/pwm-tiecap.o] Error 1
make[1]: *** [drivers/pwm] Error 2
make: *** [drivers] Error 2Signed-off-by: Philip Avinash
Signed-off-by: Thierry Reding
11 Mar, 2013
3 commits
-
This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix
the following build warning when CONFIG_PM_SLEEP is not selected.drivers/pwm/pwm-tiehrpwm.c:562:12: warning: 'ehrpwm_pwm_suspend' defined but not used [-Wunused-function]
drivers/pwm/pwm-tiehrpwm.c:580:12: warning: 'ehrpwm_pwm_resume' defined but not used [-Wunused-functionSigned-off-by: Jingoo Han
Signed-off-by: Thierry Reding -
This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix
the following build warning when CONFIG_PM_SLEEP is not selected.drivers/pwm/pwm-tipwmss.c:104:12: warning: 'pwmss_suspend' defined but not used [-Wunused-function]
drivers/pwm/pwm-tipwmss.c:113:12: warning: 'pwmss_resume' defined but not used [-Wunused-function]Signed-off-by: Jingoo Han
Signed-off-by: Thierry Reding -
This patch adds CONFIG_PM_SLEEP to suspend/resume functions to fix
the following build warning when CONFIG_PM_SLEEP is not selected.drivers/pwm/pwm-tiecap.c:314:12: warning: 'ecap_pwm_suspend' defined but not used [-Wunused-function]
drivers/pwm/pwm-tiecap.c:328:12: warning: 'ecap_pwm_resume' defined but not used [-Wunused-function]Signed-off-by: Jingoo Han
Signed-off-by: Thierry Reding
08 Mar, 2013
2 commits
-
Instead of using legacy suspend/resume methods, using newer dev_pm_ops
structure allows better control over power management.Signed-off-by: Jingoo Han
Signed-off-by: Thierry Reding -
Use devm_kzalloc() to make cleanup paths more simple.
Signed-off-by: Jingoo Han
Signed-off-by: Thierry Reding
27 Feb, 2013
2 commits
-
Pull PWM changes from Thierry Reding:
"A new driver has been added to support the PWM mode of the timer
counter blocks found on Atmel AT91 SoCs. The VT8500 driver now
supports changing the PWM signal polarity and the TI drivers (EHRPWM
and ECAP) gained suspend and resume functionality.User drivers can now query the core for whether access to a PWM device
will sleep (if the PWM chip is on a slow bus such as I2C or SPI).The pwm-backlight driver now handles the backlight BL_CORE_FBBLANK
state in addition to the FB layer's blanking states.To round things off, a few fixes and cleanups are also included"
* tag 'for-3.9-rc1' of git://gitorious.org/linux-pwm/linux-pwm:
pwm: twl: Use to_twl() instead of container_of()
pwm: tegra: assume CONFIG_OF
pwm_backlight: Validate dft_brightness in main probe function
pwm: Export pwm_{set,get}_chip_data()
pwm: Make Kconfig entries more consistent
pwm: Add can_sleep property to drivers
pwm: Add pwm_can_sleep() as exported API to users
pwm-backlight: handle BL_CORE_FBBLANK state
pwm: pwm-tiecap: Low power sleep support
pwm: pwm-tiehrpwm: Low power sleep support
pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver
pwm: vt8500: Add polarity support
pwm: vt8500: Register write busy test performed incorrectly
pwm: atmel: add Timer Counter Block PWM driver -
Pull LED subsystem update from Bryan Wu.
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (61 commits)
leds: leds-sunfire: use dev_err()/pr_err() instead of printk()
leds: 88pm860x: Add missing of_node_put()
leds: tca6507: Use of_get_child_count()
leds: leds-pwm: make it depend on PWM and not HAVE_PWM
Documentation: leds: update LP55xx family devices
leds-lp55xx: fix problem on removing LED attributes
leds-lp5521/5523: add author and copyright description
leds-lp5521/5523: use new lp55xx common header
leds-lp55xx: clean up headers
leds-lp55xx: clean up definitions
leds-lp55xx: clean up unused data and functions
leds-lp55xx: clean up _remove()
leds-lp55xx: add new function for removing device attribtues
leds-lp55xx: code refactoring on selftest function
leds-lp55xx: use common device attribute driver function
leds-lp55xx: support device specific attributes
leds-lp5523: use generic firmware interface
leds-lp5521: use generic firmware interface
leds-lp55xx: support firmware interface
leds-lp55xx: add new lp55xx_register_sysfs() for the firmware interface
...
17 Feb, 2013
1 commit
-
Always use to_twl() for converting into private data instead of
container_of().Signed-off-by: Johannes Thumshirn
Signed-off-by: Thierry Reding
16 Feb, 2013
1 commit
-
Tegra only supports, and always enables, device tree. Remove all ifdefs
for DT support from the driver.Signed-off-by: Stephen Warren
Signed-off-by: Thierry Reding
02 Feb, 2013
2 commits
-
When booted with DT users can use devm version of of_pwm_get() to benefit
from automatic resource release.Signed-off-by: Peter Ujfalusi
Acked-by: Thierry Reding
Signed-off-by: Bryan Wu -
Allow client driver to use of_pwm_get() to get the PWM they need. This
is needed for drivers which handle more than one PWM separately, like
leds-pwm driver, which have:pwmleds {
compatible = "pwm-leds";
kpad {
label = "omap4::keypad";
pwms = ;
max-brightness = ;
};charging {
label = "omap4:green:chrg";
pwms = ;
max-brightness = ;
};
};in the dts files.
Signed-off-by: Peter Ujfalusi
Acked-by: Thierry Reding
Signed-off-by: Bryan Wu
30 Jan, 2013
4 commits
-
When building a driver as a module, these functions need to be exported
for linking to succeed.Signed-off-by: Thierry Reding
-
PWM is now consistently spelled in all uppercase letters. For the Atmel
driver the entry now also mentions Atmel to make it easier to find.Signed-off-by: Thierry Reding
-
Calls to PWM drivers connected through I2C can sleep.
Use the new can_sleep property.Acked-by: Peter Ujfalusi
Signed-off-by: Florian Vaussard
Signed-off-by: Thierry Reding -
Calls to some external PWM chips can sleep. To help users,
add pwm_can_sleep() API.Cc: Thierry Reding
Cc: Peter Ujfalusi
Signed-off-by: Florian Vaussard
Reviewed-by: Peter Ujfalusi
Signed-off-by: Thierry Reding
23 Jan, 2013
1 commit
-
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.Signed-off-by: Thierry Reding
Acked-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman
17 Jan, 2013
2 commits
-
In low power modes of AM33XX platforms, peripherals power is cut off.
This patch supports low power sleep transition support for ECAP driver.Signed-off-by: Philip Avinash
Signed-off-by: Thierry Reding -
In low power modes of AM33XX platforms, peripherals power is cut off.
This patch supports low power sleep transition support for EHRPWM
driver.Signed-off-by: Philip Avinash
Signed-off-by: Thierry Reding
14 Jan, 2013
1 commit
-
The clock framework has changed and it's now better to invoke
clock_prepare_enable() and clk_disable_unprepare() rather than the
legacy clk_enable() and clk_disable() calls. This patch converts the
pwm-tiehrpwm driver to the new framework.Signed-off-by: Philip Avinash
Signed-off-by: Thierry Reding
09 Jan, 2013
1 commit
-
Add support to set polarity on PWM devices, allowing for inverted
duty cycles.Also update the binding document to #pwm-cells = to allow
passing the flags from devicetree.Signed-off-by: Tony Prisk
Signed-off-by: Thierry Reding