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]
Message-ID: <CACRpkdZNzUwLG2virD_UqxN_SwO6S_xZASfXZnaSNBiXEk2DWQ@mail.gmail.com>
Date:   Fri, 12 Oct 2018 13:03:38 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Russell King <linux@...linux.org.uk>
Cc:     Jon Hunter <jonathanh@...dia.com>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Aaro Koskinen <aaro.koskinen@....fi>,
        jacopo <jacopo@...ndi.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Mark Brown <broonie@...nel.org>,
        Alexander Shiyan <shc_work@...l.ru>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        Daniel Mack <zonque@...il.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Philipp Zabel <philipp.zabel@...il.com>,
        linux-tegra@...r.kernel.org,
        Janusz Krzysztofik <jmkrzyszt@...il.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only

On Fri, Oct 12, 2018 at 12:43 PM Russell King - ARM Linux
<linux@...linux.org.uk> wrote:

> Given that DT describes the hardware, not the software implementation,
> it must not change just because we move from GPIO numbers to GPIO
> descriptors.
>
> The existing DT description is reasonable, and introducing ficticious
> regulators in DT to work around the implementation is not reasonable.

You're right. In the electronics and the device tree it
makes perfect sense for the same line to enable/disable several
regulators.

The patch I made is a quick hack to allow multiple users of the
same descriptor, I think the long term fix is simply allow multiple
users where applicable and maintain a reference count just like
the regulator core is doing, assert the GPIO when the first
consumer asserts it and de-assert it when the last consumer
de-asserts it.

What the old and current gpiolib does us just
call the callback to enable/disable the line immediately as
response to the callback asserting/deasserting the GPIO,
which is just too simplified.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ