summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-pxa.c
Commit message (Collapse)AuthorAgeFilesLines
* pwm: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* pwm: pxa: Remove unnecessary OOM messagesJingoo Han2014-04-281-3/+1
| | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: Constify OF match tableThierry Reding2014-04-011-1/+1
| | | | | | | The table is never modified and all OF functions that use it take a const struct of_device_id *. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: Fix typo "pwm" -> "PWM"Thierry Reding2014-04-011-1/+1
| | | | | | Being an abbreviation, PWM should always be capitalized in prose. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* Revert "pwm: pxa: Use of_match_ptr()"Thierry Reding2014-04-011-1/+3
| | | | | | | | | This reverts commit 8468949cddcdbb1b1b1bc552aefceb252078ceb1. The OF match table dummy for non-OF configurations cannot be removed because it is still used by the pxa_pwm_get_id_dt() function. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: Use of_match_ptr()Jingoo Han2014-02-261-3/+1
| | | | | | | | Use of_match_ptr(), because of_match_ptr() returns NULL pointer when CONFIG_OF is disabled. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: remove unnecessary space before tabsJingoo Han2013-12-201-1/+1
| | | | | | | | | | Remove unnecessary space before tabs in order to fix the following checkpatch warning. WARNING: please, no space before tabs Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: Add device tree supportMike Dunn2013-12-041-0/+53
| | | | | | | | | | | | | | | | | | This patch adds device tree support to the PXA's PWM driver. Nothing needs to be extracted from the device tree node by the PWM device. Client devices need only specify the period; the per-chip index is implicitly zero because one device node must be present for each PWM output in use. This approach is more convenient due to the wide variability in the number of PWM channels present across the various PXA variants, and is made possible by the fact that the register sets for each PWM channel are segregated from each other. An of_xlate() method is added to parse this single-cell node. The existing ID table is reused for the match table data. Tested on a Palm Treo 680 (both platform data and DT cases). Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: pxa: Use module_platform_driverMike Dunn2013-09-031-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 <mikedunn@newsguy.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* drivers/pwm: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-181-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 <wsa@the-dreams.de> Acked-by: Stephen Warren <swarren@nvidia.com>
* pwm: pxa: Remove PWM_ID_BASE macroAxel Lin2013-04-021-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 <axel.lin@ingics.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chipAxel Lin2013-04-021-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 <axel.lin@ingics.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: Convert to devm_ioremap_resource()Thierry Reding2013-01-221-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 <thierry.reding@avionic-design.de> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pwm: remove use of __devexitBill Pemberton2012-11-281-1/+1
| | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pwm: remove use of __devinitBill Pemberton2012-11-281-1/+1
| | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pwm: remove use of __devexit_pBill Pemberton2012-11-281-1/+1
| | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pwm: Check for negative duty-cycle and periodThierry Reding2012-10-051-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 <thierry.reding@avionic-design.de> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Sachin Kamat <sachin.kamat@linaro.org> Cc: Axel Lin <axel.lin@gmail.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: Jonghwan Choi <jhbird.choi@samsung.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: "Philip, Avinash" <avinashphilip@ti.com> Cc: Vaibhav Bedia <vaibhav.bedia@ti.com> Acked-by: Jingoo Han <jg1.han@samsung.com>
* pwm: pxa: Propagate pwmchip_remove() errorThierry Reding2012-07-231-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 <thierry.reding@avionic-design.de>
* pwm: Convert pwm-pxa to use devm_* APIsAxel Lin2012-07-231-39/+10
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: Move PXA PWM driver to PWM frameworkThierry Reding2012-07-021-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 <thierry.reding@avionic-design.de>
OpenPOWER on IntegriCloud