[RFC PATCH v1] Revert "pwm: Clear chip_data in pwm_put()"
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Mar 8 08:52:02 PST 2023
Hello George,
On Wed, Mar 08, 2023 at 12:16:00PM +0000, George Stark wrote:
> On 3/8/23 00:28, Uwe Kleine-König wrote:
> > If you ask me, better drop pwm_set_chip_data() completely. It adds no
> > useful value. It's just a variant of driver data and using both
> > complicates the driver and probably fragments memory allocations. Also
> > the sematic of driver data is better known as it's the same for all
> > subsystems.
> >
> > Do you use the capture functionality? In my eyes the capture part of the
> > pwm subsystem is very alien. Only a small subset of the hardware
> > supports this and the counter framework should be better suited for such
> > tasks.
> I don't use pwm-sti driver. I update meson pwm driver for new chips
> and when started using pwm_set_chip_data in probe I was very surprised that
> my data is lost after sysfs export/unexport calls. Then I found the
> patch and
> checked other drivers for similar usecases.
OK.
> Probably you're right about dropping pwm_set_chip_data.
If you want to tackle that, you might want to take
https://lore.kernel.org/all/20210504132537.62072-2-u.kleine-koenig@pengutronix.de/
into account. (Both to reuse this patch to prepare pwm-berlin for
dropping pwm_set_chip_data and to be prepared that back then Thierry
opposed to the idea.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- 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-arm-kernel/attachments/20230308/71f9de84/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list