linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/15] pwm: add support for atomic update
@ 2015-07-01  8:21 Boris Brezillon
  2015-07-01  8:21 ` [RFC PATCH 01/15] pwm: add the pwm_is_enabled() helper Boris Brezillon
                   ` (19 more replies)
  0 siblings, 20 replies; 68+ messages in thread
From: Boris Brezillon @ 2015-07-01  8:21 UTC (permalink / raw)
  To: linux-arm-kernel

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.

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.

The 5 first patches prepare the addition of the pwm_state concept, which
will be used to allow atomic updates.
The following patches introduce the pwm_state struct, initial state
retrieval and atomic update concepts.

Patches 12 and 13 are showing how one can implement the initial state
retrieval and atomic update features in a PWM driver (in this specific
case I implemented it in the rockchip driver).

The last 2 patches are making use of those changes to improve the
pwm-regulator driver (initializing the regulator state based on the
initial PWM state).

Best Regards,

Boris

Boris Brezillon (15):
  pwm: add the pwm_is_enabled() helper
  pwm: fix pwm_get_period and pwm_get_duty_cycle prototypes
  pwm: add pwm_get_polarity helper function
  pwm: make use of pwm_get_xxx helpers where appropriate
  pwm: introduce default period and polarity concepts
  pwm: define a new pwm_state struct
  pwm: move the enabled/disabled info to pwm_state struct
  backlight: pwm_bl: remove useless call to pwm_set_period
  pwm: declare a default PWM state
  pwm: add the PWM initial state retrieval infra
  pwm: add the core infrastructure to allow atomic update
  pwm: rockchip: add initial state retrieval
  pwm: rockchip: add support for atomic update
  regulator: pwm: implement ->enable(), ->disable() and ->is_enabled
    methods
  regulator: pwm: properly initialize the ->state field

 drivers/leds/leds-pwm.c              |   2 +-
 drivers/pwm/core.c                   | 136 ++++++++++++++++++++++++++++++-----
 drivers/pwm/pwm-atmel-tcb.c          |   2 +-
 drivers/pwm/pwm-atmel.c              |   6 +-
 drivers/pwm/pwm-bcm-kona.c           |   7 +-
 drivers/pwm/pwm-ep93xx.c             |   4 +-
 drivers/pwm/pwm-imx.c                |   5 +-
 drivers/pwm/pwm-mxs.c                |   4 +-
 drivers/pwm/pwm-pxa.c                |   2 +-
 drivers/pwm/pwm-renesas-tpu.c        |   2 +-
 drivers/pwm/pwm-rockchip.c           | 122 ++++++++++++++++++++++++-------
 drivers/pwm/pwm-sun4i.c              |   3 +-
 drivers/pwm/pwm-tegra.c              |   6 +-
 drivers/pwm/pwm-tiecap.c             |  10 +--
 drivers/pwm/pwm-tiehrpwm.c           |   6 +-
 drivers/pwm/sysfs.c                  |  13 ++--
 drivers/regulator/pwm-regulator.c    |  60 ++++++++++++++--
 drivers/video/backlight/lm3630a_bl.c |   4 +-
 drivers/video/backlight/pwm_bl.c     |   6 +-
 drivers/video/fbdev/ssd1307fb.c      |   2 +-
 include/linux/pwm.h                  |  82 ++++++++++++++++++---
 21 files changed, 380 insertions(+), 104 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2015-07-20 10:12 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01  8:21 [RFC PATCH 00/15] pwm: add support for atomic update Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 01/15] pwm: add the pwm_is_enabled() helper Boris Brezillon
2015-07-20  7:47   ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 02/15] pwm: fix pwm_get_period and pwm_get_duty_cycle prototypes Boris Brezillon
2015-07-20  7:50   ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 03/15] pwm: add pwm_get_polarity helper function Boris Brezillon
2015-07-20  7:52   ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 04/15] pwm: make use of pwm_get_xxx helpers where appropriate Boris Brezillon
2015-07-20  8:00   ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 05/15] pwm: introduce default period and polarity concepts Boris Brezillon
2015-07-02  6:44   ` Uwe Kleine-König
2015-07-02  7:49     ` Boris Brezillon
2015-07-20  8:03       ` Thierry Reding
2015-07-20  8:14         ` Boris Brezillon
2015-07-20  8:22           ` Thierry Reding
2015-07-20  8:32             ` Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 06/15] pwm: define a new pwm_state struct Boris Brezillon
2015-07-20  8:04   ` Thierry Reding
2015-07-20 10:01     ` Boris Brezillon
2015-07-20 10:09       ` Thierry Reding
2015-07-20 10:12         ` Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 07/15] pwm: move the enabled/disabled info to " Boris Brezillon
2015-07-20  8:11   ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 08/15] backlight: pwm_bl: remove useless call to pwm_set_period Boris Brezillon
2015-07-20  8:16   ` Thierry Reding
2015-07-20  8:21     ` Boris Brezillon
2015-07-20  8:36       ` Thierry Reding
2015-07-20  8:50         ` Boris Brezillon
2015-07-20  9:10           ` Thierry Reding
2015-07-20  9:57             ` Boris Brezillon
2015-07-20 10:01               ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 09/15] pwm: declare a default PWM state Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 10/15] pwm: add the PWM initial state retrieval infra Boris Brezillon
2015-07-20  9:01   ` Thierry Reding
2015-07-20  9:42     ` Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 11/15] pwm: add the core infrastructure to allow atomic update Boris Brezillon
2015-07-20  8:59   ` Thierry Reding
2015-07-20  9:48     ` Boris Brezillon
2015-07-20 10:04       ` Thierry Reding
2015-07-01  8:21 ` [RFC PATCH 12/15] pwm: rockchip: add initial state retrieval Boris Brezillon
2015-07-01 21:44   ` Heiko Stübner
2015-07-02  7:46     ` Boris Brezillon
2015-07-01  8:21 ` [RFC PATCH 13/15] pwm: rockchip: add support for atomic update Boris Brezillon
2015-07-01 21:48   ` Heiko Stübner
2015-07-02  7:43     ` Boris Brezillon
2015-07-01  8:22 ` [RFC PATCH 14/15] regulator: pwm: implement ->enable(), ->disable() and ->is_enabled methods Boris Brezillon
2015-07-01 11:58   ` Heiko Stübner
2015-07-01 12:05     ` Boris Brezillon
2015-07-01 12:08       ` Heiko Stübner
2015-07-01 12:19         ` Boris Brezillon
2015-07-14 10:50   ` Mark Brown
2015-07-14 11:02     ` Boris Brezillon
2015-07-14 11:08       ` Mark Brown
2015-07-14 11:16         ` Boris Brezillon
2015-07-01  8:22 ` [RFC PATCH 15/15] regulator: pwm: properly initialize the ->state field Boris Brezillon
2015-07-14 10:51   ` Mark Brown
2015-07-14 11:03     ` Boris Brezillon
2015-07-01 21:50 ` [RFC PATCH 16/15] pwm: add informations about polarity, duty cycle and period to debugfs Heiko Stübner
2015-07-02 13:01   ` Boris Brezillon
2015-07-03  8:43     ` [PATCH] " Heiko Stübner
2015-07-01 21:57 ` [RFC PATCH 00/15] pwm: add support for atomic update Heiko Stübner
2015-07-02  7:55   ` Boris Brezillon
2015-07-02  7:03 ` Uwe Kleine-König
2015-07-02  7:17   ` Tomi Valkeinen
2015-07-02  7:42     ` Uwe Kleine-König
2015-07-02  7:30   ` Boris Brezillon
2015-07-20  7:16 ` Boris Brezillon
2015-07-20  7:43 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).