Skip to content

RFC pwm: add support for atomic update

Thierry Reding linux-arm-kernel linux-fbdev linux-leds linux-pwm linux-tegra 1 version New

Get series with b4
b4 am 20150720074339.GA29614@ulmo

Versions newest first

  1. v1 RFC Latest15 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15pwm: add the pwm_is_enabled() helper+0 -00 replies
2/15pwm: fix pwm_get_period and pwm_get_duty_cycle prototypes+0 -00 replies
3/15pwm: add pwm_get_polarity helper function+0 -00 replies
4/15pwm: make use of pwm_get_xxx helpers where appropriate+0 -00 replies
5/15pwm: introduce default period and polarity concepts+0 -01 reply
5/15pwm: introduce default period and polarity concepts+0 -01 reply
6/15pwm: define a new pwm_state struct+0 -01 reply
6/15pwm: define a new pwm_state struct+0 -01 reply
7/15pwm: move the enabled/disabled info to pwm_state struct+0 -00 replies
8/15backlight: pwm_bl: remove useless call to pwm_set_period+0 -01 reply
8/15backlight: pwm_bl: remove useless call to pwm_set_period+0 -01 reply
8/15backlight: pwm_bl: remove useless call to pwm_set_period+0 -01 reply
8/15backlight: pwm_bl: remove useless call to pwm_set_period+0 -00 replies
10/15pwm: add the PWM initial state retrieval infra+0 -01 reply
11/15pwm: add the core infrastructure to allow atomic update+0 -01 reply
11/15pwm: add the core infrastructure to allow atomic update+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/15] pwm: add support for atomic update
Quoted 6 lines · Boris Brezillon

Hello Thierry,

This series adds support for atomic PWM update, or ITO, the capability to update all the parameters of a PWM device (enabled/disabled, period, duty and polarity) in one go.

Quoted 8 lines

This implementation is still experimental, and I may have missed some key aspect, so any feedback are welcome.

Also note that I haven't protected the state update with any locking. That's because the existing config does not protect against concurrent access to a requested PWM device (see the pwm_config implementation). I guess the PWM framework assume the user will implement the proper locking scheme if it has to concurrently access the device.

Actually the reason why no protection is needed is because there can ever only be a single user of a PWM channel. pwm_request() will only hand out a handle to the PWM channel if it hasn't been requested before.

And in the unlikely case where a single user wants to use the same PWM channel from different threads, then it will have to use locking for other reasons already, so accesses to the PWM can be serialized using the same mechanism.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150720/5ba28c7a/attachment.sig>