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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Mar 2020 14:57:07 +0200
From:   Oleksandr Suvorov <oleksandr.suvorov@...adex.com>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        devicetree@...r.kernel.org, linux-pwm@...r.kernel.org,
        Paul Barker <pbarker@...sulko.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Igor Opaniuk <igor.opaniuk@...adex.com>,
        Philippe Schenker <philippe.schenker@...adex.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Fabio Estevam <festevam@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Kevin Hilman <khilman@...libre.com>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>,
        Maxime Ripard <mripard@...nel.org>,
        NXP Linux Team <linux-imx@....com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Paul Cercueil <paul@...pouillou.net>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Ray Jui <rjui@...adcom.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Scott Branden <sbranden@...adcom.com>,
        Shawn Guo <shawnguo@...nel.org>,
        bcm-kernel-feedback-list@...adcom.com,
        linux-amlogic@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-riscv@...ts.infradead.org, linux-rockchip@...ts.infradead.org
Subject: Re: [RFC PATCH 1/7] pwm: rename the PWM_POLARITY_INVERSED enum

On Thu, Mar 19, 2020 at 2:11 PM Uwe Kleine-König
<u.kleine-koenig@...gutronix.de> wrote:
>
> Hello,
>
> [dropping Tony Prisk <linux@...sktech.co.nz> from recipients]
>
> On Thu, Mar 19, 2020 at 01:40:28PM +0200, Oleksandr Suvorov wrote:
> > Thierry, I see the PWM core converts the bit field "third cell" into
> > the polarity variable.
> > Now I probably understand your sight and agree that we shouldn't give
> > the same names to bits in bitfield (dts) and values of a variable.
> >
> > But there are lots of useless "0" values of third cell of "pwms"
> > option in dts files.
> >
> > I see 2 ways now:
> > - just remove all "0" "third cell" from "pwms" options in dts files. I
> > see this "0" confuses some people.
>
> Then you have to overwrite pwm-cells of the provider. If there are two
> PWMs used from the same provider and only one is inverted this won't
> work. (Not entirely sure I understood your suggestion.) So I don't like
> this suggestion.

Good point, agree. But we still have the unnamed "0".

What about renaming the dt-bindings macro PWM_POLARITY_INVERTED
and add the new one for the normal polarity?
Like PWM_FLAG_POLARITY_NORMAL / PWM_FLAG_POLARITY_INVERTED or
DT_PWM_POLARITY_NORMAL / DT_PWM_POLARITY_INVERTED?

Using different prefix will prevent interfering names of enum and
macros in the future
and will allow using the named nop-flag PWM_FLAG_POLARITY_NORMAL in dts.

> And also in my eyes this isn't clearer, just more complicated to use.
>
> > - convert pwm_state.polarity into pwm_state.flags and use bitfield
> >   directly from dtb.
> >   It simplifies the parsing logic and makes adding new flags easier.
>
> *shrug*, I don't care much.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |



-- 
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ