Linux PWM subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] pwm: Alternative way to convert leds-qcom-lpg to devm_pwmchip_alloc()
@ 2023-11-24 21:52 Uwe Kleine-König
  2023-11-24 21:52 ` [PATCH 1/3] pwm: Provide wrappers for storing and getting private data Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-11-24 21:52 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones, Bartosz Golaszewski; +Cc: linux-pwm, kernel

Hello,

on my way home thinking about my pwm-lifetime series[1] it occurred to
me how the leds-qcom-lpg driver could be converted to use
pwmchip_alloc() much prettier. Instead of patch #102 it can just not use
the feature to allocate private data and use (a new)
pwmchip_{get,set}_drvdata() function pair.

The 2nd patch is just split out of the conversion. In my original series
the equivalent was contained in the converting patch.

I'd expect that this sorts out the concerns about the ugliness I added
in two of the "non-pure" PWM drivers. A similar approach can be used (with the
same changes in core.c and pwm.h) for adapting the ti-sn65dsi86 driver.

Best regards
Uwe

[1] https://lore.kernel.org/linux-pwm/20231121134901.208535-1-u.kleine-koenig@pengutronix.de

Uwe Kleine-König (3):
  pwm: Provide wrappers for storing and getting private data
  leds: qcom-lpg: Introduce a wrapper for getting driver data from a pwm
    chip
  leds: qcom-lpg: Make use of devm_pwmchip_alloc() function

 drivers/leds/rgb/leds-qcom-lpg.c | 27 ++++++++++++++++++---------
 drivers/pwm/core.c               |  2 ++
 include/linux/pwm.h              | 19 +++++++++++++++++++
 3 files changed, 39 insertions(+), 9 deletions(-)

(This base commit isn't published to not annoy the list with reports about
failed builds because of missing changes.)

base-commit: e40bd269dc0aa05aaf5390d66428601dc7433433
-- 
2.42.0


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

end of thread, other threads:[~2023-11-30 15:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 21:52 [PATCH 0/3] pwm: Alternative way to convert leds-qcom-lpg to devm_pwmchip_alloc() Uwe Kleine-König
2023-11-24 21:52 ` [PATCH 1/3] pwm: Provide wrappers for storing and getting private data Uwe Kleine-König
2023-11-30 14:50   ` Lee Jones
2023-11-30 15:37     ` Uwe Kleine-König
2023-11-24 21:52 ` [PATCH 2/3] leds: qcom-lpg: Introduce a wrapper for getting driver data from a pwm chip Uwe Kleine-König
2023-11-24 21:52 ` [PATCH 3/3] leds: qcom-lpg: Make use of devm_pwmchip_alloc() function Uwe Kleine-König
2023-11-30 14:53 ` [PATCH 0/3] pwm: Alternative way to convert leds-qcom-lpg to devm_pwmchip_alloc() Lee Jones
2023-11-30 15:41   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox