summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-twl.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: twl: Move header file out of I2C realmWolfram Sang2017-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* pwm: Remove .can_sleep from struct pwm_chipThierry Reding2017-01-041-1/+0
| | | | | | | All PWM devices have been marked as "might sleep" since v4.5, there is no longer a need to differentiate on a per-chip basis. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: twl: Reliably disable TWL6030 PWMsPaul Kocialkowski2016-09-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | The current TWL6030 code for the TWL PWM driver does not reliably disable the PWM output, as tested with LEDs. The previous commit to that driver introduced that regression. However, it does make sense to disable the PWM clock after resetting the PWM, but for some obscure reason, doing it all at once simply doesn't work. The TWL6030 datasheet mentions that PWMs have to be disabled in two distinct steps. However, clearing the clock enable bit in a second step (after issuing a reset first) does not work. The only approach that works is the one that was in place before the previous commit to the driver. It consists in enabling the PWM clock after issuing a reset. This is what TI kernel trees and production code seem to be using. However, adding an extra step to disable the PWM clock seems to work reliably, despite looking quite odd. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: twl: Really disable twl6030 PWMsAxel Lin2014-05-081-8/+0
| | | | | | | | | | Current twl6030_pwm_disable() implementation writes TWL6030_TOGGLE3_REG twice, the second write sets TWL6030_PWMXEN bits so the PWM clock does not disable. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: twl: Include linux/of.h headerSachin Kamat2013-10-081-0/+1
| | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
* pwm: Constify OF match tablesThierry Reding2013-04-231-1/+1
| | | | | | | | | | A few drivers already annotate this properly. Make the same change for all other OF supporting drivers. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
* pwm: twl: Return proper error if twl6030_pwm_enable() failsAxel Lin2013-04-021-1/+1
| | | | | | | | Return proper error instead of 0 if twl6030_pwm_enable() fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: twl: Add .owner to struct pwm_opsAxel Lin2013-04-021-0/+2
| | | | | | | | | Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: twl: Use to_twl() instead of container_of()Johannes Thumshirn2013-02-171-6/+3
| | | | | | | | Always use to_twl() for converting into private data instead of container_of(). Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: Add can_sleep property to driversFlorian Vaussard2013-01-301-0/+1
| | | | | | | | | Calls to PWM drivers connected through I2C can sleep. Use the new can_sleep property. Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
* pwm: New driver to support PWMs on TWL4030/6030 series of PMICsPeter Ujfalusi2012-11-281-0/+359
The driver supports the following PWM outputs: TWL4030 PWM0 and PWM1 TWL6030 PWM1 and PWM2 On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver will select the correct mux so the PWM can be used. When the PWM has been freed the original configuration is going to be restored. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>