<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-TW" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">On 08/06/2023 10:21, Billy Tsai wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> On 08/06/2023 09:47, Billy Tsai wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +allOf:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + - $ref: pwm.yaml#<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +properties:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + compatible:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + enum:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + - aspeed,ast2600-pwm<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> +<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + "#pwm-cells":<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> >> + const: 3<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> > 3 cells? For one PWM? What are they?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> >> channel, period and polarity.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> > Don't cut my responses. You wrote you have one PWM output, so only one<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> > channel. What do you put then in the channel?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> >> You need to put 0 in the cell of the channel, the example of the dts usage will like following:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> > If you always put 0 isn't this a proof that it's wrong?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">No, if your PWM controller only has one pwm output, then it should only be configured as 0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This is the usage of the pwm-cells property.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">https://github.com/torvalds/linux/blob/master/drivers/pwm/core.c#L129-L158
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">https://github.com/torvalds/linux/blob/master/include/linux/pwm.h#LL299C20-L299C20<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">All of the pwm driver with npwm = 1 will has the same usage.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>