Skip to content

Commit

Permalink
pwm: NXP LPC18xx PWM/SCT driver
Browse files Browse the repository at this point in the history
This commit adds support for NXP LPC18xx PWM/SCT.

NXP LPC SoCs family, which includes LPC18xx/LPC43xx, provides a State
Configurable Timer (SCT) which can be configured as a Pulse Width
Modulator. Other SoCs in that family may share the same hardware.

The PWM supports a total of 16 channels, but only 15 can be simultaneously
requested. There's only one period, global to all the channels, thus PWM
driver will refuse setting different values to it, unless there's only one
channel requested.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
[thierry.reding@gmail.com: remove excessive padding of fields]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Ariel D'Alessandro authored and Thierry Reding committed Sep 9, 2015
1 parent 01ec847 commit 841e6f9
Show file tree
Hide file tree
Showing 3 changed files with 478 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/pwm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ config PWM_LP3943
To compile this driver as a module, choose M here: the module
will be called pwm-lp3943.

config PWM_LPC18XX_SCT
tristate "LPC18xx/43xx PWM/SCT support"
depends on ARCH_LPC18XX
help
Generic PWM framework driver for NXP LPC18xx PWM/SCT which
supports 16 channels.
A maximum of 15 channels can be requested simultaneously and
must have the same period.

To compile this driver as a module, choose M here: the module
will be called pwm-lpc18xx-sct.

config PWM_LPC32XX
tristate "LPC32XX PWM support"
depends on ARCH_LPC32XX
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_PWM_IMG) += pwm-img.o
obj-$(CONFIG_PWM_IMX) += pwm-imx.o
obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
obj-$(CONFIG_PWM_LP3943) += pwm-lp3943.o
obj-$(CONFIG_PWM_LPC18XX_SCT) += pwm-lpc18xx-sct.o
obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx.o
obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o
obj-$(CONFIG_PWM_LPSS_PCI) += pwm-lpss-pci.o
Expand Down
Loading

0 comments on commit 841e6f9

Please sign in to comment.