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:   Wed, 30 Oct 2019 16:31:31 +0200
From:   Peter Ujfalusi <peter.ujfalusi@...com>
To:     Mark Brown <broonie@...nel.org>
CC:     Rob Herring <robh+dt@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Tero Kristo <t-kristo@...com>,
        Maxime Ripard <mripard@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        <devicetree@...r.kernel.org>
Subject: Re: [RFC v2 0/2] gpio: Support for shared GPIO lines on boards



On 30/10/2019 16.17, Mark Brown wrote:
> On Wed, Oct 30, 2019 at 03:32:09PM +0200, Peter Ujfalusi wrote:
>> On 30/10/2019 15.12, Rob Herring wrote:
> 
>>> Why can't we just add a shared flag like we have for interrupts?
>>> Effectively, we have that for resets too, it's just hardcoded in the
>>> the drivers.
> 
>> This would be kind of the same thing what the
>> GPIOD_FLAGS_BIT_NONEXCLUSIVE does, which was a quick workaround for
>> fixed-regulators afaik.
> 
> The theory with that was that any usage of this would need the
> higher level code using the GPIO to cooperate so they didn't step
> on each other's toes so the GPIO code should just punt to it.

But from the client driver point of view a GPIO is still GPIO and if the
components are unrelated then it is hard to patch things together from
the top.

>> But let's say that a board design will pick two components (C1 and C2)
>> and use the same GPIO line to enable them. We already have the drivers
>> for them and they are used in boards already.
> 
> This is basically an attempt to make a generic implementation of
> that cooperation for simple cases.

Without some generic implementation we would need to patch up drivers
(sometimes unrelated) for components which uses the same GPIO line on
some random board.

We have such a thing for tlv310aic3x (for Nokia n900). I would need one
for pcm3168a and there were an attempt for max98927 also.
We also have boards where one GPIO is used for backlight and panel, etc.

If we would have generic way then it can be tuned for more exotic
setups, but again, I believe that board designers are not doing things
just to be evil. What they connect most of the times are 'sane'

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ