Re: [RFC PATCH v1 15/20] pwm: Add capability for PWM Driver managed state

From: Linus Walleij
Date: Thu Sep 16 2021 - 18:00:21 EST


On Tue, Aug 24, 2021 at 6:48 PM <lakshmi.sowjanya.d@xxxxxxxxx> wrote:

> From: Christopher Hall <christopher.s.hall@xxxxxxxxx>
>
> Add additional flag that can be set by drivers to indicate that the
> driver will manage its own PWM state. When calling pwm_ops.apply the
> driver applies the requested state change to the pwm_device reconciling,
> if possible, any conflicting requests.
>
> Intel(R) Timed I/O devices support very limited PWM capabilities. The
> duty cycle must always be 50% of the period. When changing one parameter
> at a time through the sysfs interface, it isn't possible for the user or
> the PWM subsystem to maintain this relation.
>
> Signed-off-by: Christopher Hall <christopher.s.hall@xxxxxxxxx>
> Signed-off-by: Tamal Saha <tamal.saha@xxxxxxxxx>
> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@xxxxxxxxx>
> Reviewed-by: Mark Gross <mgross@xxxxxxxxxxxxxxx>

These PWM changes clearly need to be reviewed by the PWM
subsystem maintainers, and I think all of the output generation
portions of this really need to go into the PWM subsystem.

Yours,
Linus Walleij