pwm: Use -EINVAL for unsupported polarity
[linux-block.git] / drivers / pwm / Kconfig
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
0c2498f1 2menuconfig PWM
b817bf5c 3 bool "Pulse-Width Modulation (PWM) Support"
0c2498f1 4 help
b817bf5c 5 Generic Pulse-Width Modulation (PWM) support.
0c2498f1 6
b817bf5c
TR
7 In Pulse-Width Modulation, a variation of the width of pulses
8 in a rectangular pulse signal is used as a means to alter the
9 average power of the signal. Applications include efficient
10 power delivery and voltage regulation. In computer systems,
11 PWMs are commonly used to control fans or the brightness of
12 display backlights.
13
14 This framework provides a generic interface to PWM devices
15 within the Linux kernel. On the driver side it provides an API
16 to register and unregister a PWM chip, an abstraction of a PWM
17 controller, that supports one or more PWM devices. Client
18 drivers can request PWM devices and use the generic framework
19 to configure as well as enable and disable them.
20
21 This generic framework replaces the legacy PWM framework which
22 allows only a single driver implementing the required API. Not
23 all legacy implementations have been ported to the framework
24 yet. The framework provides an API that is backward compatible
25 with the legacy framework so that existing client drivers
26 continue to work as expected.
27
28 If unsure, say no.
0c2498f1
SH
29
30if PWM
31
76abbdde
HS
32config PWM_SYSFS
33 bool
34 default y if SYSFS
35
3ad1f3a3
UKK
36config PWM_DEBUG
37 bool "PWM lowlevel drivers additional checks and debug messages"
38 depends on DEBUG_KERNEL
39 help
40 This option enables some additional checks to help lowlevel driver
41 authors to get their callbacks implemented correctly.
42 It is expected to introduce some runtime overhead and diagnostic
43 output to the kernel log, so only enable while working on a driver.
44
6173f8f4
TR
45config PWM_AB8500
46 tristate "AB8500 PWM support"
47 depends on AB8500_CORE && ARCH_U8500
48 help
49 Generic PWM framework driver for Analog Baseband AB8500.
50
51 To compile this driver as a module, choose M here: the module
52 will be called pwm-ab8500.
53
32b16d46
BS
54config PWM_ATMEL
55 tristate "Atmel PWM support"
e96c0ff4
KK
56 depends on OF
57 depends on ARCH_AT91 || COMPILE_TEST
32b16d46
BS
58 help
59 Generic PWM framework driver for Atmel SoC.
60
61 To compile this driver as a module, choose M here: the module
62 will be called pwm-atmel.
63
2b4984be
BB
64config PWM_ATMEL_HLCDC_PWM
65 tristate "Atmel HLCDC PWM support"
66 depends on MFD_ATMEL_HLCDC
d2048c49 67 depends on HAVE_CLK
2b4984be
BB
68 help
69 Generic PWM framework driver for the PWM output of the HLCDC
70 (Atmel High-end LCD Controller). This PWM output is mainly used
71 to control the LCD backlight.
72
73 To compile this driver as a module, choose M here: the module
74 will be called pwm-atmel-hlcdc.
75
9421bade 76config PWM_ATMEL_TCB
b133d2a1 77 tristate "Atmel TC Block PWM support"
061f8572
AB
78 depends on OF
79 select REGMAP_MMIO
9421bade
BB
80 help
81 Generic PWM framework driver for Atmel Timer Counter Block.
82
83 A Timer Counter Block provides 6 PWM devices grouped by 2.
84 Devices in a given group must have the same period.
85
86 To compile this driver as a module, choose M here: the module
87 will be called pwm-atmel-tcb.
88
daa5abc4
YRDR
89config PWM_BCM_IPROC
90 tristate "iProc PWM support"
5bf22ff3
SB
91 depends on ARCH_BCM_IPROC || COMPILE_TEST
92 depends on COMMON_CLK
93 default ARCH_BCM_IPROC
daa5abc4
YRDR
94 help
95 Generic PWM framework driver for Broadcom iProc PWM block. This
96 block is used in Broadcom iProc SoC's.
97
98 To compile this driver as a module, choose M here: the module
99 will be called pwm-bcm-iproc.
100
6a4e4bff
TK
101config PWM_BCM_KONA
102 tristate "Kona PWM support"
88a053d2
CP
103 depends on ARCH_BCM_MOBILE || ARCH_BCM_CYGNUS || COMPILE_TEST
104 depends on HAVE_CLK && HAS_IOMEM
105 default ARCH_BCM_MOBILE || ARCH_BCM_CYGNUS
6a4e4bff
TK
106 help
107 Generic PWM framework driver for Broadcom Kona PWM block.
108
109 To compile this driver as a module, choose M here: the module
110 will be called pwm-bcm-kona.
111
e5a06dc5
BT
112config PWM_BCM2835
113 tristate "BCM2835 PWM support"
e96c0ff4 114 depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST
e5a06dc5
BT
115 help
116 PWM framework driver for BCM2835 controller (Raspberry Pi)
117
118 To compile this driver as a module, choose M here: the module
119 will be called pwm-bcm2835.
120
59d5c8b1
AT
121config PWM_BERLIN
122 tristate "Marvell Berlin PWM support"
e96c0ff4 123 depends on ARCH_BERLIN || COMPILE_TEST
59d5c8b1
AT
124 help
125 PWM framework driver for Marvell Berlin SoCs.
126
127 To compile this driver as a module, choose M here: the module
128 will be called pwm-berlin.
129
3a9f5957
FF
130config PWM_BRCMSTB
131 tristate "Broadcom STB PWM support"
e96c0ff4 132 depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
3a9f5957
FF
133 help
134 Generic PWM framework driver for the Broadcom Set-top-Box
135 SoCs (BCM7xxx).
136
137 To compile this driver as a module, choose M Here: the module
138 will be called pwm-brcmstb.c.
139
7eb3f6ff
AS
140config PWM_CLPS711X
141 tristate "CLPS711X PWM support"
142 depends on ARCH_CLPS711X || COMPILE_TEST
dec02f98 143 depends on HAS_IOMEM
7eb3f6ff
AS
144 help
145 Generic PWM framework driver for Cirrus Logic CLPS711X.
146
147 To compile this driver as a module, choose M here: the module
148 will be called pwm-clps711x.
149
a3f37a10
SK
150config PWM_CRC
151 bool "Intel Crystalcove (CRC) PWM support"
152 depends on X86 && INTEL_SOC_PMIC
153 help
154 Generic PWM framework driver for Crystalcove (CRC) PMIC based PWM
155 control.
156
1f0d3bb0
BN
157config PWM_CROS_EC
158 tristate "ChromeOS EC PWM driver"
47f11e0b 159 depends on CROS_EC
1f0d3bb0
BN
160 help
161 PWM driver for exposing a PWM attached to the ChromeOS Embedded
162 Controller.
163
1ed2b3fc
JN
164config PWM_DWC
165 tristate "DesignWare PWM Controller"
166 depends on PCI
167 help
168 PWM driver for Synopsys DWC PWM Controller attached to a PCI bus.
169
170 To compile this driver as a module, choose M here: the module
171 will be called pwm-dwc.
172
a2308698
HS
173config PWM_EP93XX
174 tristate "Cirrus Logic EP93xx PWM support"
e96c0ff4 175 depends on ARCH_EP93XX || COMPILE_TEST
a2308698
HS
176 help
177 Generic PWM framework driver for Cirrus Logic EP93xx.
178
179 To compile this driver as a module, choose M here: the module
180 will be called pwm-ep93xx.
181
b505183b
XL
182config PWM_FSL_FTM
183 tristate "Freescale FlexTimer Module (FTM) PWM support"
36d5be4b 184 depends on HAS_IOMEM
b505183b 185 depends on OF
00018a8a 186 select REGMAP_MMIO
b505183b
XL
187 help
188 Generic FTM PWM framework driver for Freescale VF610 and
189 Layerscape LS-1 SoCs.
190
191 To compile this driver as a module, choose M here: the module
192 will be called pwm-fsl-ftm.
193
d09f0081 194config PWM_HIBVT
195 tristate "HiSilicon BVT PWM support"
196 depends on ARCH_HISI || COMPILE_TEST
197 help
198 Generic PWM framework driver for HiSilicon BVT SoCs.
199
200 To compile this driver as a module, choose M here: the module
201 will be called pwm-hibvt.
202
277bb6a2
NT
203config PWM_IMG
204 tristate "Imagination Technologies PWM driver"
205 depends on HAS_IOMEM
206 depends on MFD_SYSCON
207 depends on COMMON_CLK
208 depends on MIPS || COMPILE_TEST
209 help
210 Generic PWM framework driver for Imagination Technologies
211 PWM block which supports 4 channels.
212
213 To compile this driver as a module, choose M here: the module
214 will be called pwm-img
215
d80f8206
UKK
216config PWM_IMX1
217 tristate "i.MX1 PWM support"
e96c0ff4 218 depends on ARCH_MXC || COMPILE_TEST
29693248 219 help
d80f8206 220 Generic PWM framework driver for i.MX1 and i.MX21
29693248
SH
221
222 To compile this driver as a module, choose M here: the module
d80f8206
UKK
223 will be called pwm-imx1.
224
225config PWM_IMX27
226 tristate "i.MX27 PWM support"
e96c0ff4 227 depends on ARCH_MXC || COMPILE_TEST
d80f8206
UKK
228 help
229 Generic PWM framework driver for i.MX27 and later i.MX SoCs.
230
231 To compile this driver as a module, choose M here: the module
232 will be called pwm-imx27.
29693248 233
738a1cfe
AH
234config PWM_IMX_TPM
235 tristate "i.MX TPM PWM support"
236 depends on ARCH_MXC || COMPILE_TEST
237 depends on HAVE_CLK && HAS_IOMEM
238 help
239 Generic PWM framework driver for i.MX7ULP TPM module, TPM's full
240 name is Low Power Timer/Pulse Width Modulation Module.
241
242 To compile this driver as a module, choose M here: the module
243 will be called pwm-imx-tpm.
244
97960add
RT
245config PWM_INTEL_LGM
246 tristate "Intel LGM PWM support"
247 depends on HAS_IOMEM
248 depends on (OF && X86) || COMPILE_TEST
249 select REGMAP_MMIO
250 help
251 Generic PWM fan controller driver for LGM SoC.
252
253 To compile this driver as a module, choose M here: the module
254 will be called pwm-intel-lgm.
255
6f0841a8
JL
256config PWM_IQS620A
257 tristate "Azoteq IQS620A PWM support"
258 depends on MFD_IQS62X || COMPILE_TEST
259 help
260 Generic PWM framework driver for the Azoteq IQS620A multi-function
261 sensor.
262
263 To compile this driver as a module, choose M here: the module will
264 be called pwm-iqs620a.
265
f6b8a570 266config PWM_JZ4740
b4190062 267 tristate "Ingenic JZ47xx PWM support"
b48d49e0 268 depends on MIPS
ce1f9cec 269 depends on COMMON_CLK
c2693514 270 select MFD_SYSCON
f6b8a570 271 help
b4190062 272 Generic PWM framework driver for Ingenic JZ47xx based
f6b8a570
TR
273 machines.
274
275 To compile this driver as a module, choose M here: the module
276 will be called pwm-jz4740.
277
bd899ceb
VA
278config PWM_KEEMBAY
279 tristate "Intel Keem Bay PWM driver"
280 depends on ARCH_KEEMBAY || (ARM64 && COMPILE_TEST)
281 help
282 The platform driver for Intel Keem Bay PWM controller.
283
284 To compile this driver as a module, choose M here: the module
285 will be called pwm-keembay.
286
af66b3c0
MK
287config PWM_LP3943
288 tristate "TI/National Semiconductor LP3943 PWM support"
289 depends on MFD_LP3943
290 help
291 Generic PWM framework driver for LP3943 which supports two PWM
292 channels.
293
294 To compile this driver as a module, choose M here: the module
295 will be called pwm-lp3943.
296
841e6f90
AA
297config PWM_LPC18XX_SCT
298 tristate "LPC18xx/43xx PWM/SCT support"
e96c0ff4 299 depends on ARCH_LPC18XX || COMPILE_TEST
841e6f90
AA
300 help
301 Generic PWM framework driver for NXP LPC18xx PWM/SCT which
302 supports 16 channels.
303 A maximum of 15 channels can be requested simultaneously and
304 must have the same period.
305
306 To compile this driver as a module, choose M here: the module
307 will be called pwm-lpc18xx-sct.
308
2132fa8d
APS
309config PWM_LPC32XX
310 tristate "LPC32XX PWM support"
e96c0ff4 311 depends on ARCH_LPC32XX || COMPILE_TEST
2132fa8d
APS
312 help
313 Generic PWM framework driver for LPC32XX. The LPC32XX SOC has two
314 PWM controllers.
315
316 To compile this driver as a module, choose M here: the module
317 will be called pwm-lpc32xx.
318
d16a5aa9 319config PWM_LPSS
6f90a00c 320 tristate
d16a5aa9 321
c558e39e
AS
322config PWM_LPSS_PCI
323 tristate "Intel LPSS PWM PCI driver"
6f90a00c
AS
324 depends on X86 && PCI
325 select PWM_LPSS
c558e39e
AS
326 help
327 The PCI driver for Intel Low Power Subsystem PWM controller.
328
329 To compile this driver as a module, choose M here: the module
330 will be called pwm-lpss-pci.
331
332config PWM_LPSS_PLATFORM
333 tristate "Intel LPSS PWM platform driver"
6f90a00c
AS
334 depends on X86 && ACPI
335 select PWM_LPSS
c558e39e
AS
336 help
337 The platform driver for Intel Low Power Subsystem PWM controller.
338
339 To compile this driver as a module, choose M here: the module
340 will be called pwm-lpss-platform.
341
211ed630
NA
342config PWM_MESON
343 tristate "Amlogic Meson PWM driver"
e96c0ff4
KK
344 depends on ARCH_MESON || COMPILE_TEST
345 depends on COMMON_CLK
211ed630
NA
346 help
347 The platform driver for Amlogic Meson PWM controller.
348
349 To compile this driver as a module, choose M here: the module
350 will be called pwm-meson.
351
7e3b7dc7
YH
352config PWM_MTK_DISP
353 tristate "MediaTek display PWM driver"
354 depends on ARCH_MEDIATEK || COMPILE_TEST
355 depends on HAS_IOMEM
356 help
357 Generic PWM framework driver for MediaTek disp-pwm device.
358 The PWM is used to control the backlight brightness for display.
359
360 To compile this driver as a module, choose M here: the module
361 will be called pwm-mtk-disp.
362
caf065f8
JC
363config PWM_MEDIATEK
364 tristate "MediaTek PWM support"
8cdc43af 365 depends on ARCH_MEDIATEK || RALINK || COMPILE_TEST
caf065f8
JC
366 help
367 Generic PWM framework driver for Mediatek ARM SoC.
368
369 To compile this driver as a module, choose M here: the module
aa12d7a7 370 will be called pwm-mediatek.
caf065f8 371
4dce82c1
SG
372config PWM_MXS
373 tristate "Freescale MXS PWM support"
e96c0ff4
KK
374 depends on OF
375 depends on ARCH_MXS || COMPILE_TEST
01bf32e9 376 select STMP_DEVICE
4dce82c1
SG
377 help
378 Generic PWM framework driver for Freescale MXS.
379
380 To compile this driver as a module, choose M here: the module
381 will be called pwm-mxs.
382
6604c655
NA
383config PWM_OMAP_DMTIMER
384 tristate "OMAP Dual-Mode Timer PWM support"
9f2919e9
UKK
385 depends on OF
386 depends on OMAP_DM_TIMER || COMPILE_TEST
6604c655
NA
387 help
388 Generic PWM framework driver for OMAP Dual-Mode Timer PWM output
389
390 To compile this driver as a module, choose M here: the module
391 will be called pwm-omap-dmtimer
392
88b613e6
ST
393config PWM_PCA9685
394 tristate "NXP PCA9685 PWM driver"
912b8439 395 depends on I2C
2c80a492 396 select REGMAP_I2C
88b613e6
ST
397 help
398 Generic PWM framework driver for NXP PCA9685 LED controller.
399
400 To compile this driver as a module, choose M here: the module
401 will be called pwm-pca9685.
402
17b2b478
TR
403config PWM_PXA
404 tristate "PXA PWM support"
e96c0ff4 405 depends on ARCH_PXA || COMPILE_TEST
17b2b478
TR
406 help
407 Generic PWM framework driver for PXA.
408
409 To compile this driver as a module, choose M here: the module
410 will be called pwm-pxa.
411
ed6c1476
YS
412config PWM_RCAR
413 tristate "Renesas R-Car PWM support"
48169988 414 depends on ARCH_RENESAS || COMPILE_TEST
ed6c1476
YS
415 depends on HAS_IOMEM
416 help
417 This driver exposes the PWM Timer controller found in Renesas
418 R-Car chips through the PWM API.
419
420 To compile this driver as a module, choose M here: the module
421 will be called pwm-rcar.
422
99b82abb
LP
423config PWM_RENESAS_TPU
424 tristate "Renesas TPU PWM support"
03d99531 425 depends on ARCH_RENESAS || COMPILE_TEST
2974b098 426 depends on HAS_IOMEM
99b82abb
LP
427 help
428 This driver exposes the Timer Pulse Unit (TPU) PWM controller found
429 in Renesas chips through the PWM API.
430
431 To compile this driver as a module, choose M here: the module
432 will be called pwm-renesas-tpu.
433
101353c8
BG
434config PWM_ROCKCHIP
435 tristate "Rockchip PWM support"
e96c0ff4 436 depends on ARCH_ROCKCHIP || COMPILE_TEST
101353c8
BG
437 help
438 Generic PWM framework driver for the PWM controller found on
439 Rockchip SoCs.
440
215c29d3 441config PWM_SAMSUNG
b133d2a1 442 tristate "Samsung PWM support"
db8230d2 443 depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
215c29d3
SH
444 help
445 Generic PWM framework driver for Samsung.
446
447 To compile this driver as a module, choose M here: the module
448 will be called pwm-samsung.
449
9e37a53e
YS
450config PWM_SIFIVE
451 tristate "SiFive PWM support"
452 depends on OF
453 depends on COMMON_CLK
454 depends on RISCV || COMPILE_TEST
455 help
456 Generic PWM framework driver for SiFive SoCs.
457
458 To compile this driver as a module, choose M here: the module
459 will be called pwm-sifive.
460
9db33d22
MW
461config PWM_SL28CPLD
462 tristate "Kontron sl28cpld PWM support"
463 depends on MFD_SL28CPLD || COMPILE_TEST
464 help
465 Generic PWM framework driver for board management controller
466 found on the Kontron sl28 CPLD.
467
468 To compile this driver as a module, choose M here: the module
469 will be called pwm-sl28cpld.
470
ce20364b
SH
471config PWM_SPEAR
472 tristate "STMicroelectronics SPEAr PWM support"
e96c0ff4 473 depends on PLAT_SPEAR || COMPILE_TEST
ce20364b
SH
474 depends on OF
475 help
476 Generic PWM framework driver for the PWM controller on ST
477 SPEAr SoCs.
478
479 To compile this driver as a module, choose M here: the module
480 will be called pwm-spear.
481
8aae4b02
BW
482config PWM_SPRD
483 tristate "Spreadtrum PWM support"
484 depends on ARCH_SPRD || COMPILE_TEST
485 depends on HAS_IOMEM
486 help
487 Generic PWM framework driver for the PWM controller on
488 Spreadtrum SoCs.
489
490 To compile this driver as a module, choose M here: the module
491 will be called pwm-sprd.
492
378fe115
LJ
493config PWM_STI
494 tristate "STiH4xx PWM support"
e96c0ff4 495 depends on ARCH_STI || COMPILE_TEST
378fe115
LJ
496 depends on OF
497 help
498 Generic PWM framework driver for STiH4xx SoCs.
499
500 To compile this driver as a module, choose M here: the module
501 will be called pwm-sti.
502
7edf7369
BG
503config PWM_STM32
504 tristate "STMicroelectronics STM32 PWM"
e96c0ff4 505 depends on MFD_STM32_TIMERS || COMPILE_TEST
7edf7369
BG
506 help
507 Generic PWM framework driver for STM32 SoCs.
508
509 To compile this driver as a module, choose M here: the module
510 will be called pwm-stm32.
511
e70a540b
FG
512config PWM_STM32_LP
513 tristate "STMicroelectronics STM32 PWM LP"
514 depends on MFD_STM32_LPTIMER || COMPILE_TEST
515 help
516 Generic PWM framework driver for STMicroelectronics STM32 SoCs
517 with Low-Power Timer (LPTIM).
518
519 To compile this driver as a module, choose M here: the module
520 will be called pwm-stm32-lp.
521
ef1f09ec
LW
522config PWM_STMPE
523 bool "STMPE expander PWM export"
524 depends on MFD_STMPE
525 help
526 This enables support for the PWMs found in the STMPE I/O
527 expanders.
528
09853ce7
AB
529config PWM_SUN4I
530 tristate "Allwinner PWM support"
531 depends on ARCH_SUNXI || COMPILE_TEST
532 depends on HAS_IOMEM && COMMON_CLK
533 help
534 Generic PWM framework driver for Allwinner SoCs.
535
536 To compile this driver as a module, choose M here: the module
537 will be called pwm-sun4i.
538
0134b932
TR
539config PWM_TEGRA
540 tristate "NVIDIA Tegra PWM support"
e96c0ff4 541 depends on ARCH_TEGRA || COMPILE_TEST
0134b932
TR
542 help
543 Generic PWM framework driver for the PWFM controller found on NVIDIA
544 Tegra SoCs.
545
546 To compile this driver as a module, choose M here: the module
547 will be called pwm-tegra.
548
f24e5641 549config PWM_TIECAP
8e0cb05b 550 tristate "ECAP PWM support"
e96c0ff4 551 depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
8e0cb05b 552 help
6f37709f 553 PWM driver support for the ECAP APWM controller found on TI SOCs
8e0cb05b
PA
554
555 To compile this driver as a module, choose M here: the module
556 will be called pwm-tiecap.
557
f24e5641 558config PWM_TIEHRPWM
19891b20 559 tristate "EHRPWM PWM support"
e96c0ff4 560 depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_K3 || COMPILE_TEST
19891b20 561 help
efc80fb3 562 PWM driver support for the EHRPWM controller found on TI SOCs
19891b20
PA
563
564 To compile this driver as a module, choose M here: the module
565 will be called pwm-tiehrpwm.
566
3744c263
PU
567config PWM_TWL
568 tristate "TWL4030/6030 PWM support"
569 depends on TWL4030_CORE
570 help
571 Generic PWM framework driver for TWL4030/6030.
572
573 To compile this driver as a module, choose M here: the module
574 will be called pwm-twl.
575
aa765647
PU
576config PWM_TWL_LED
577 tristate "TWL4030/6030 PWM support for LED drivers"
578 depends on TWL4030_CORE
579 help
580 Generic PWM framework driver for TWL4030/6030 LED terminals.
581
582 To compile this driver as a module, choose M here: the module
583 will be called pwm-twl-led.
584
a245cceb 585config PWM_VT8500
b133d2a1 586 tristate "vt8500 PWM support"
e96c0ff4 587 depends on ARCH_VT8500 || COMPILE_TEST
a245cceb
SH
588 help
589 Generic PWM framework driver for vt8500.
590
591 To compile this driver as a module, choose M here: the module
592 will be called pwm-vt8500.
593
4836193c
SG
594config PWM_ZX
595 tristate "ZTE ZX PWM support"
e96c0ff4 596 depends on ARCH_ZX || COMPILE_TEST
4836193c
SG
597 help
598 Generic PWM framework driver for ZTE ZX family SoCs.
599
600 To compile this driver as a module, choose M here: the module
601 will be called pwm-zx.
602
0c2498f1 603endif