<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > On 10/24/24 08:40, Uwe Kleine-König wrote:</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > > On Thu, Oct 24, 2024 at 03:15:46PM +0800, Billy Tsai wrote:</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >> Aspeed PWM controller has the WDT reload feature, which changes the duty</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >> cycle to a preprogrammed value after a WDT/EXTRST#.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >></i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >> Billy Tsai (2):</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >> hwmon: (aspeed-g6-pwm-tacho): Extend the #pwm-cells to 4</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > >> hwmon: (aspeed-g6-pwm-tacho): Support the WDT reload</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > ></i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > > Huh, I'm not convinced that extending #pwm-cells for that feature is a</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > > good idea. Unless I'm missing something none of the other supported PWM</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > > chips can do that, so I hesitate to change a standard for it. I suggest</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > > > to make this a separate property instead.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> ></i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > Using a separate property to enable this feature is a straightforward</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > method, but I don’t understand why extending #pwm-cells isn’t a good</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > idea in my situation. The feature ‘WDT reload’ can be set for</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > individual PWM channels, and the PWM subsystem has the of_xlate</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > callback hook, which allows each driver to define its arguments for</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > the PWM consumer. I’m unsure if I misunderstood this callback usage,</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > as I couldn’t find examples. If my understanding is correct, this</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > method is better for adding our specific feature, rather than using</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > child nodes or separate properties to indicate which PWM channel</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > should enable this feature with the corresponding duty cycle values. I</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > think using separate properties to achieve this feature would be quite</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > cumbersome.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > As I know the arguments for this usage are as follows:</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > First: PWM channel index</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > Second: PWM period in ns</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > Third: PWM polarity</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > Therefore, I extended our feature to a fourth argument to avoid any confusion regarding usage and added the description in our yaml file.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> ></i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> > If my thinking is incorrect or doesn’t make sense, please let me know.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> It might make sense if your bubble only contains that single PWM</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> hardware. However if you extend the pwm cells semantic for your PWM to</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> mean "period if the PWM watchdog triggers", i can hardly refuse the next</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> developer who wants to extend for "period of the secondary output pin of</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> the PWM" or a step counter or some property that defines how the duty</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> cycle is modulated over time. And should the next one also use the 4th</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> u32 for his purpose, or should we consider it reserved now for your</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> purpose such that the duty_cycle modulation goes into the 7th cell?</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Uwe,</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
In my view, the order of arguments—such as PWM number, PWM period in ns, and PWM polarity—is just</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
a convention for PWM consumers to follow. Even if another driver doesn’t adhere strictly to this</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
rule, it shouldn’t be considered an error if the YAML file documents the usage of each argument.</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
For example, some PWM controllers set #pwm-cells to 1, where the first argument isn’t necessarily</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
the PWM number. In google,cros-ec-pwm.yaml, it’s treated as the PWM index, while in marvell,pxa-pwm.yaml,</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
it represents the period in ns.</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
If users want to work with these PWM controllers, they should confirm the purpose of each argument from the</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
YAML file, rather than assuming the PWM driver follows a conventional argument order. If the YAML file doesn’t</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
specify details, it can be treated as described in pwm.yaml, which is fine. However, if there are any differences,</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I think recording them in their own YAML file is sufficient (Like google,cros-ec-pwm.yaml and marvell,pxa-pwm.yaml).</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> Today the bindings are (well nearly) used in the same way for all</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> hardwares and I want to keep it that way. If your PWM has a special</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> feature, give it a speaking name that the occasional dts reader has a</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<i>> chance to understand without reading HW docs or dt bindings.</i></div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Using another DTS property to achieve this isn’t as elegant as utilizing PWM arguments, which will only</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
be applied when the PWM consumer uses it. This is another reason I want to extend the PWM cells semantic.</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Best regards</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Billy Tsai</div>
<div style="line-height: 21px; white-space: pre; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>