[PW_SID:966164] [RFC,1/6] rust: Add basic PWM abstractions#442
[PW_SID:966164] [RFC,1/6] rust: Add basic PWM abstractions#442linux-riscv-bot wants to merge 6 commits into
Conversation
Introduce initial Rust abstractions for the Linux PWM subsystem. These
abstractions provide safe wrappers around the core C data structures and
functions, enabling the development of PWM chip drivers in Rust.
The main components added are:
- A Kconfig option RUST_PWM_ABSTRACTIONS
- C helper functions in rust/helpers/pwm.c to provide stable callable
interfaces for Rust, for pwmchip_parent, pwmchip_get_drvdata, and
pwmchip_set_drvdata
- A new Rust module rust/kernel/pwm.rs containing:
- Safe wrappers for struct pwm_chip, struct pwm_device,
struct pwm_state, and struct pwm_args
- An enum Polarity for type safe polarity handling
- Functions devm_chip_alloc and devm_chip_add which wrap the
kernel's device-managed APIs for PWM chip allocation and
registration.
- A PwmOps trait and create_pwm_ops function to allow Rust
drivers to define their PWM operations, initially supporting the
.apply callback.
This foundational layer will be used by subsequent patches to implement
a specific PWM chip driver in Rust. It focuses on the pwm_chip provider
APIs necessary for such a driver.
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Introduce a PWM driver for the T-HEAD TH1520 SoC written in Rust. It utilizes the Rust PWM abstractions added in the previous commit. The driver implements the standard PwmOps for the PWM framework, supporting configuration of period, duty cycle, and polarity for the TH1520's PWM channels. It uses devm managed resources for the PWM chip itself and Rust DevRes for I/O memory. Clock management is handled using Rust's RAII pattern. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the Device Tree binding documentation for the T-HEAD TH1520 SoC PWM controller. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the Device Tree node for the T-HEAD TH1520 SoC's PWM controller. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add PVT DT node for thermal sensor. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add Device Tree nodes to enable a PWM controlled fan and it's associated thermal management for the Lichee Pi 4A board. This enables temperature-controlled active cooling for the Lichee Pi 4A board based on SoC temperature. Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 1: "[RFC,1/6] rust: Add basic PWM abstractions" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 2: "[RFC,2/6] pwm: Add Rust driver for T-HEAD TH1520 SoC" |
|
Patch 4: "[RFC,4/6] riscv: dts: thead: Add PWM controller node" |
|
Patch 4: "[RFC,4/6] riscv: dts: thead: Add PWM controller node" |
|
Patch 4: "[RFC,4/6] riscv: dts: thead: Add PWM controller node" |
|
Patch 4: "[RFC,4/6] riscv: dts: thead: Add PWM controller node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 5: "[RFC,5/6] riscv: dts: thead: Add PVT node" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
|
Patch 6: "[RFC,6/6] riscv: dts: thead: Add PWM fan and thermal control" |
PR for series 966164 applied to workflow__riscv__fixes
Name: [RFC,1/6] rust: Add basic PWM abstractions
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=966164
Version: 1