Go to file
Phil Elwell 99792f1635 pwm: Add pwm-pio-rp1 driver
Use the PIO hardware on RP1 to implement a PWM interface.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>

pwm: rp1: use pwmchip_get_drvdata() instead of container_of()

The PWM framework may not embed struct pwm_chip within the driver’s
private data. Using container_of() can result in accessing invalid
memory or NULL pointers, especially after recent kernel changes.

Switch to pwmchip_get_drvdata() to reliably access the driver data.
This resolves kernel warnings and probe failures seen after updating
from kernel 6.12.28 to 6.12.34 [1]

While at it remove the now obsolete `struct pwm_chip chip` member from
`struct pwm_pio_rp1`.

[1] https://github.com/raspberrypi/linux/issues/6971

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>

pwm: rp1: Silently correct illegal values

Remove the need for the user to know the limitations of this PWM
implementation by adjusting configuration requests to be the closest
acceptable value. Add a get_state method so that the actual values can
be queried.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>

pwm: rp1: Correct period off-by-1 error

Correct the set_period method to pass (period - 1), as required by the
PIO state machine.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2025-12-01 12:28:00 +00:00
2025-12-01 12:28:00 +00:00
2025-12-01 12:28:00 +00:00
2025-12-01 12:27:52 +00:00
2022-09-28 09:02:20 +02:00
2025-02-19 14:53:27 -07:00
2025-11-30 14:42:10 -08:00
2024-03-18 03:36:32 -06:00

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.

Build status for rpi-6.1.y: Pi kernel build tests dtoverlaycheck

Build status for rpi-6.6.y: Pi kernel build tests dtoverlaycheck

Build status for rpi-6.12.y: Pi kernel build tests dtoverlaycheck

Description
No description provided
Readme 4.7 GiB
Languages
C 97.7%
Assembly 1.3%
Shell 0.3%
Makefile 0.3%
Python 0.2%
Other 0.1%