lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210426161944.65rmbqzgqqqqpoby@pengutronix.de>
Date:   Mon, 26 Apr 2021 18:19:44 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Lee Jones <lee.jones@...aro.org>, linux-pwm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pwm: Introduce single-PWM of_xlate function

On Mon, Apr 26, 2021 at 10:24:27AM -0500, Bjorn Andersson wrote:
> 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@...aro.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.

I personally have no problem with it, for clk-providers it is also
normal that some need an id and others don't. If we have such concerns
(Thierry?) we should insist that new drivers always require an channel
id (which is always 0 for single-channel PWMs).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ