Skip to content

Commit 841e6f9

Browse files
Ariel D'Alessandrothierryreding
authored andcommitted
pwm: NXP LPC18xx PWM/SCT driver
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 <[email protected]> [[email protected]: remove excessive padding of fields] Signed-off-by: Thierry Reding <[email protected]>
1 parent 01ec847 commit 841e6f9

File tree

3 files changed

+478
-0
lines changed

3 files changed

+478
-0
lines changed

drivers/pwm/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,18 @@ config PWM_LP3943
173173
To compile this driver as a module, choose M here: the module
174174
will be called pwm-lp3943.
175175

176+
config PWM_LPC18XX_SCT
177+
tristate "LPC18xx/43xx PWM/SCT support"
178+
depends on ARCH_LPC18XX
179+
help
180+
Generic PWM framework driver for NXP LPC18xx PWM/SCT which
181+
supports 16 channels.
182+
A maximum of 15 channels can be requested simultaneously and
183+
must have the same period.
184+
185+
To compile this driver as a module, choose M here: the module
186+
will be called pwm-lpc18xx-sct.
187+
176188
config PWM_LPC32XX
177189
tristate "LPC32XX PWM support"
178190
depends on ARCH_LPC32XX

drivers/pwm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_PWM_IMG) += pwm-img.o
1414
obj-$(CONFIG_PWM_IMX) += pwm-imx.o
1515
obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
1616
obj-$(CONFIG_PWM_LP3943) += pwm-lp3943.o
17+
obj-$(CONFIG_PWM_LPC18XX_SCT) += pwm-lpc18xx-sct.o
1718
obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx.o
1819
obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o
1920
obj-$(CONFIG_PWM_LPSS_PCI) += pwm-lpss-pci.o

0 commit comments

Comments
 (0)