Linux PWM Gains An Atomic Interface In Linux 4.7

Written by Michael Larabel in Hardware on 25 May 2016 at 02:18 PM EDT. 12 Comments
HARDWARE
The Linux Kernel's PWM (Pulse Width Modulation) interface now has an atomic API for those writing drivers for fans, LEDs, vibrators, and other supported devices.

The Linux PWM code that was pulled into the mainline kernel tree today adds an atomic API, which was inspired in part by the DRM subsystem's recent atomic API upbringing.

Thierry Reding explained:
This set of changes introduces an atomic API to the PWM subsystem. This is influenced by the DRM atomic API that was introduced a while back, though it is obviously a lot simpler. The fundamental idea remains the same, though: drivers provide a single callback to implement the atomic configuration of a PWM channel.

As a side-effect the PWM subsystem gains the ability for initial state retrieval, so that the logical state mirrors that of the hardware. Many use-cases don't care about this, but for others it is essential.

These new features require changes in all users, which these patches take care of. The core is transitioned to use the atomic callback if available and provides a fallback mechanism for other drivers.

Changes to transition users and drivers to the atomic API are postponed to v4.8.

More details here.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week