[PATCH v1 0/2] Enable WDT reload feature
Billy Tsai
billy_tsai at aspeedtech.com
Fri Oct 25 13:00:39 AEDT 2024
> On 10/24/24 08:40, Uwe Kleine-König wrote:
> > Hello,
> >
> > On Thu, Oct 24, 2024 at 03:15:46PM +0800, Billy Tsai wrote:
> >> Aspeed PWM controller has the WDT reload feature, which changes the duty
> >> cycle to a preprogrammed value after a WDT/EXTRST#.
> >>
> >> Billy Tsai (2):
> >> hwmon: (aspeed-g6-pwm-tacho): Extend the #pwm-cells to 4
> >> hwmon: (aspeed-g6-pwm-tacho): Support the WDT reload
> >
> > Huh, I'm not convinced that extending #pwm-cells for that feature is a
> > good idea. Unless I'm missing something none of the other supported PWM
> > chips can do that, so I hesitate to change a standard for it. I suggest
> > to make this a separate property instead.
> >
> Agreed.
> Guenter
Hi Uwe and Guenter,
Using a separate property to enable this feature is a straightforward method, but I don’t understand why extending #pwm-cells isn’t a good idea in my situation. The feature ‘WDT reload’ can be set for individual PWM channels, and the PWM subsystem has the of_xlate callback hook, which allows each driver to define its arguments for the PWM consumer. I’m unsure if I misunderstood this callback usage, as I couldn’t find examples. If my understanding is correct, this method is better for adding our specific feature, rather than using child nodes or separate properties to indicate which PWM channel should enable this feature with the corresponding duty cycle values. I think using separate properties to achieve this feature would be quite cumbersome.
As I know the arguments for this usage are as follows:
First: PWM channel index
Second: PWM period in ns
Third: PWM polarity
Therefore, I extended our feature to a fourth argument to avoid any confusion regarding usage and added the description in our yaml file.
If my thinking is incorrect or doesn’t make sense, please let me know.
Thanks
More information about the Linux-aspeed
mailing list