aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-pxa.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03pwm: pxa: Use module_platform_driverMike Dunn1-11/+1
Commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d pwm: Add sysfs interface causes a kernel oops due to a null pointer dereference on PXA platforms. This happens because the class added by the patch is registered in a subsys_initcall (initcall4), but the pxa pwm driver is registered in arch_initcall (initcall3). If the class is not registered before the driver probe function runs, the oops occurs in device_add() when the uninitialized pointers in struct class are dereferenced. I don't see a reason that the driver must be an arch_initcall, so this patch makes it a regular module_platform_driver (initcall6), preventing the oops. Signed-off-by: Mike Dunn <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Acked-by: Marek Vasut <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-05-18drivers/pwm: don't check resource with devm_ioremap_resourceWolfram Sang1-5/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Stephen Warren <[email protected]>
2013-04-02pwm: pxa: Remove PWM_ID_BASE macroAxel Lin1-4/+3
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 <[email protected]> Acked-by: Eric Miao <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-04-02pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chipAxel Lin1-14/+2
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 <[email protected]> Acked-by: Eric Miao <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-01-22pwm: Convert to devm_ioremap_resource()Thierry Reding1-3/+3
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 <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28pwm: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28pwm: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28pwm: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-05pwm: Check for negative duty-cycle and periodThierry Reding1-3/+0
Make sure the duty-cycle and period passed in are not negative. This should eventually be made implicit by making them unsigned. While at it, the drivers' .config() implementations can have the equivalent checks removed. Signed-off-by: Thierry Reding <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Mark Brown <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Sachin Kamat <[email protected]> Cc: Axel Lin <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Jingoo Han <[email protected]> Cc: Jonghwan Choi <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: "Philip, Avinash" <[email protected]> Cc: Vaibhav Bedia <[email protected]> Acked-by: Jingoo Han <[email protected]>
2012-07-23pwm: pxa: Propagate pwmchip_remove() errorThierry Reding1-2/+1
If the pwmchip_remove() call fails, propagate the error to the driver's remove callback. This is required to prevent the module from being unloaded if a PWM provided by the driver is still in use. Signed-off-by: Thierry Reding <[email protected]>
2012-07-23pwm: Convert pwm-pxa to use devm_* APIsAxel Lin1-39/+10
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2012-07-02pwm: Move PXA PWM driver to PWM frameworkThierry Reding1-0/+248
This commit moves the PXA PWM driver to the drivers/pwm subdirectory and converts it to use the new PWM framework. Signed-off-by: Thierry Reding <[email protected]>