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: <CACRpkdZK34QfbSBJvshfZekk5TJBU5sZog-9uszLSmFPOGJgiw@mail.gmail.com>
Date:   Tue, 22 Nov 2016 13:58:32 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Laxman Dewangan <ldewangan@...dia.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Stephen Warren <swarren@...dotorg.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexandre Courbot <gnurou@...il.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Joe Perches <joe@...ches.com>,
        Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH V3 2/2] pinctrl: tegra: Add driver to configure voltage
 and power of io pads

On Tue, Nov 22, 2016 at 11:20 AM, Laxman Dewangan <ldewangan@...dia.com> wrote:

> NVIDIA Tegra124 and later SoCs support the multi-voltage level and
> low power state of some of its IO pads. The IO pads can work in
> the voltage of the 1.8V and 3.3V of IO voltage from IO power rail
> sources. When IO interfaces are not used then IO pads can be
> configure in low power state to reduce the power consumption from
> that IO pads.
>
> On Tegra124, the voltage level of IO power rail source is auto
> detected by hardware(SoC) and hence it is only require to configure
> in low power mode if IO pads are not used.
>
> On T210 onwards, the auto-detection of voltage level from IO power
> rail is removed from SoC and hence SW need to configure the PMC
> register explicitly to set proper voltage in IO pads based on
> IO rail power source voltage.
>
> This driver adds the IO pad driver to configure the power state and
> IO pad voltage based on the usage and power tree via pincontrol
> framework. The configuration can be static and dynamic.
>
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>

Overall very nice!

> +               rinfo->regulator = devm_regulator_get_optional(dev,
> +                                               soc_data->cfg[i].vsupply);

Please just use devm_regulator_get().

As has been discussed at lenth elsewhere "optional" in regulator_get_optional
does *not* mean "software optional", it means "hardware optional".

Such as a terminal that may have a voltage connected or not be
connected to anything at all.

If the system does not define a regulator you will anyway get a
dummy regulator.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ