lkml.org 
[lkml]   [2021]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] pwm: Introduce single-PWM of_xlate function
On Sat 24 Apr 06:32 CDT 2021, Uwe Kleine-K?nig wrote:

> Hello,
>
> On Fri, Apr 23, 2021 at 04:33:04PM -0500, Bjorn Andersson wrote:
> > The existing pxa driver and the upcoming addition of PWM support in the
> > TI sn565dsi86 DSI/eDP bridge driver both has a single PWM channel and
> > thereby a need for a of_xlate function with the period as its single
> > argument.
> >
> > Introduce a common helper function in the core that can be used as
> > of_xlate by such drivers and migrate the pxa driver to use this.
> >
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
> I'm OK with the idea as such. I'd like to see the semantic expanded a
> bit however such that the function can parse
>
> pwms = <&mypwm 50000>;
>
> and also
>
> pwms = <&mypwm 500000 PWM_POLARITY_INVERTED>;
>
> . You suggetion only covers the former.

One concern though is that a single-channel pwm with the optional flag
would syntactically be indistinguishable from a multi-channel property
without flags. Presumably the values are out of range though, so I
suppose there's no problem in practice.

Please let me know if you think there's any merit to this concern and
I'll respin the patch accordingly.

Thanks,
Bjorn

>
> See
> https://lore.kernel.org/r/20210315111124.2475274-2-u.kleine-koenig@pengutronix.de
> for my first attempt to unify of_pwm_xlate_with_flags and
> of_pwm_simple_xlate accordingly.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |


\
 
 \ /
  Last update: 2021-04-26 17:25    [W:0.150 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site