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, 11 Oct 2017 09:43:40 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Quentin Schulz <quentin.schulz@...e-electrons.com>
Cc:     Chen-Yu Tsai <wens@...e.org>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Russell King <linux@...linux.org.uk>,
        Lee Jones <lee.jones@...aro.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        linux-sunxi <linux-sunxi@...glegroups.com>
Subject: Re: [PATCH v3 12/12] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when
 used as LDOs

On Wed, Oct 4, 2017 at 9:35 AM, Quentin Schulz
<quentin.schulz@...e-electrons.com> wrote:

> Just to be a little more precise,
>      - 0: drive low
>      - 1: drive high
>      - 2: input with interrupt triggering
>      - 3: LDO on
>      - 4: LDO off
>      - 5~7: floating (or ADC)
>
> for AXP813, and
>      - 0: drive low
>      - 1: drive high
>      - 2: input with interrupt triggering
>      - 3: LDO on
>      - 4: ADC
>      - 5~7: floating

Fair enough, it's mux modes that the pin supports, no big surprises.

> So I think what you suggested Linus is not really relevant here as the
> regulator framework will take care of disabling the regulator when
> needed (for AXP813 via the ldo_off "muxing" selected by the regulator
> framework).

I think I see why I got confused.

The point is that your mode for setting it to "LDO on" should have the
pin control state connected to the relevant device.

It should be connected to the regulator and nothing else, so if there is a fixed
regulator or whatever in the device tree, it should have pinctrl-0
and pinctrl-names = ".."; here is is for some obscure reason connected
to the GPIO controller (!) instead, and the actual consumer of this state
is NOT the GPIO controller, but quite obviously the regulator, so
put the pinctrl business in that regulator node instead.

"default" mode is OK on a regulator, as that can be expected to make the
pin precisely a regulator pin. Forget my ramblings about a "regulator"
state.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ