9
0
Fork 0
Commit Graph

13 Commits

Author SHA1 Message Date
Sascha Hauer ea0ed15786 PWM: Implement devicetree support
This implements of_pwm_request() for PWM client drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 15:05:46 +01:00
Sascha Hauer 37acfdf97d PWM: Add functions for getting/setting period/duty cycle
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 15:05:41 +01:00
Sascha Hauer acd028a3cb PWM: Add i.MX PWM driver
The Kernel driver from Linux-3.13 with some adjustments for
barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 16:34:12 +01:00
Sascha Hauer 72141fa925 PWM: pxa: use pwmx as devname
As this changes the name of the pwm we also have to adjust it in
pwm_request.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 07:17:23 +01:00
Sascha Hauer 5da563f1e6 PWM: Use a separate device for PWMs
Instead of directly using the hardware devicet for PWMs register
a logical PWM device so that the user operates on pwmx devices rather
than pxa-pwmx.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 10:57:40 +01:00
Sascha Hauer f043520c5a pwm: sanity check values before passing them to the drivers
Check for valid period size before calling ops->config. This fixes
the pxa driver which otherwise does a division by zero. While at
it, also check for duty_ns being smaller or equal to period_ns.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
2013-09-27 07:16:50 +02:00
Sascha Hauer 3a9f068ccb pwm: Use dev_add_param_int for pwm parameters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
2013-04-11 11:48:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer c9f1ac9d54 pwm PXA: Compile only on PXA
The PXA PWM driver does not compile on any other architecture, so
depend on PXA.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Robert Jarzmik bf841a598e drivers/pwm: add PXA pulse width modulator controller
Add PXA embedded pulse width modulator support. The PWM can
generate signals from 49.6kHz to 1.625MHz.
The driver is for pxa2xx family. The pxa3xx was not handled yet.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:18:30 +01:00
Robert Jarzmik 6fa3e3119f drivers/pwm: add duty_ns and period_ns to core pwm chip
Add variables to control the duty_ns and period_ns of PWM
chips. When these variables are set, a call to either
pwm_enable() or pwm_config() is performed to enforce the
setup values.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:18:30 +01:00
Sascha Hauer f917e6f866 Add pwm core support
This patch adds framework support for PWM (pulse width modulation)
devices.
A new pwm can be registered from a hardware driver using
pwmchip_add(). It can then be requested from a client driver using
pwm_request(). A string is used as a unique identifier for the
pwms. It should usually be initialized by the hardware drivers
using dev_name(dev). The client API is the same as currently
in the Linux Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:18:27 +01:00