drivers/pwm/Kconfig

Source file repositories/reference/linux-study-clean/drivers/pwm/Kconfig

File Facts

System
Linux kernel
Corpus path
drivers/pwm/Kconfig
Extension
[no extension]
Size
25854 bytes
Lines
870
Domain
Driver Families
Bucket
drivers/pwm
Inferred role
Driver Families: build/configuration rule
Status
atlas-only

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
menuconfig PWM
	bool "Pulse-Width Modulation (PWM) Support"
	help
	  Generic Pulse-Width Modulation (PWM) support.

	  In Pulse-Width Modulation, a variation of the width of pulses
	  in a rectangular pulse signal is used as a means to alter the
	  average power of the signal. Applications include efficient
	  power delivery and voltage regulation. In computer systems,
	  PWMs are commonly used to control fans or the brightness of
	  display backlights.

	  This framework provides a generic interface to PWM devices
	  within the Linux kernel. On the driver side it provides an API
	  to register and unregister a PWM chip, an abstraction of a PWM
	  controller, that supports one or more PWM devices. Client
	  drivers can request PWM devices and use the generic framework
	  to configure as well as enable and disable them.

	  This generic framework replaces the legacy PWM framework which
	  allows only a single driver implementing the required API. Not
	  all legacy implementations have been ported to the framework
	  yet. The framework provides an API that is backward compatible
	  with the legacy framework so that existing client drivers
	  continue to work as expected.

	  If unsure, say no.

if PWM

config PWM_DEBUG
	bool "PWM lowlevel drivers additional checks and debug messages"
	depends on DEBUG_KERNEL
	help
	  This option enables some additional checks to help lowlevel driver
	  authors to get their callbacks implemented correctly.
	  It is expected to introduce some runtime overhead and diagnostic
	  output to the kernel log, so only enable while working on a driver.

config PWM_PROVIDE_GPIO
	bool "Provide a GPIO chip for each PWM chip"
	depends on GPIOLIB
	help
	  Most PWMs can emit both a constant active high and a constant active
	  low signal and so they can be used as GPIO. Say Y here to let each
	  PWM chip provide a GPIO chip and so be easily plugged into consumers
	  that know how to handle GPIOs but not PWMs.

config PWM_AB8500
	tristate "AB8500 PWM support"
	depends on AB8500_CORE && ARCH_U8500
	help
	  Generic PWM framework driver for Analog Baseband AB8500.

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

config PWM_ADP5585
	tristate "ADP5585 PWM support"
	depends on MFD_ADP5585
	help
	  This option enables support for the PWM function found in the Analog
	  Devices ADP5585.

config PWM_AIROHA
	tristate "Airoha PWM support"
	depends on ARCH_AIROHA || COMPILE_TEST
	select REGMAP_MMIO
	help

Annotation

Implementation Notes