[PATCH v14 2/7] rust: pwm: Add Kconfig and basic data structures
Uwe Kleine-König
ukleinek at kernel.org
Mon Sep 15 03:13:02 PDT 2025
Hello Michal,
On Wed, Aug 20, 2025 at 10:35:37AM +0200, Michal Wilczynski wrote:
> Introduce the foundational support for PWM abstractions in Rust.
>
> This commit adds the `RUST_PWM_ABSTRACTIONS` Kconfig option to enable
> the feature, along with the necessary build-system support and C
> helpers.
>
> It also introduces the first set of safe wrappers for the PWM
> subsystem, covering the basic data carrying C structs and enums:
> - `Polarity`: A safe wrapper for `enum pwm_polarity`.
> - `Waveform`: A wrapper for `struct pwm_waveform`.
> - `Args`: A wrapper for `struct pwm_args`.
> - `State`: A wrapper for `struct pwm_state`.
Args, State and Polarity are only needed for the consumer side of the
PWM API in Rust, right?
I don't particularily like like pwm_args and wonder if this really has
to be exposed to Rust.
I think for State (and thus Polarity) we have to have it for the
forseeable future.
Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20250915/04c5c311/attachment.sig>
More information about the linux-riscv
mailing list