Re: [RFC PATCH v1] Revert "pwm: Clear chip_data in pwm_put()"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx/

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/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux