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: <CACRpkdbVSEYJpSb6Uzji158gL7WHu_Bfpw2gK-qo2s66dWjY7Q@mail.gmail.com>
Date:   Tue, 4 Dec 2018 13:44:30 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Marek Szyprowski <m.szyprowski@...sung.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Charles Keepax <ckeepax@...nsource.cirrus.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups

On Tue, Dec 4, 2018 at 11:33 AM Marek Szyprowski
<m.szyprowski@...sung.com> wrote:

> >> Artik5 evaluation board (arch/arm/boot/dts/exynos3250-artik5-eval.dtb):
> >> s2mps11-pmic s2mps14-regulator: Failed to get control GPIO for 11/LDO12
> > Question: this is supposed to fail, right? It is something
> > like a probe deferral or nonexisting GPIO controller?
>
> It looks that the issue has been introduced earlier, but I didn't notice it.

Sorry :(

> gpiod_get_from_of_node() doesn't handle GPIOD_FLAGS_BIT_NONEXCLUSIVE
> flag, the rest is just a result of it.

OK I see.

> Here we have a case, where 2 regulators provided by s2mps11 driver have
> a common gpio enable line (by PMIC design), so s2mps11 calls
> devm_gpiod_get_from_of_node() 2 times for exactly the same gpio descriptor.
>
> Fixing gpiod_get_from_of_node() for GPIOD_FLAGS_BIT_NONEXCLUSIVE is trivial:

I will add a patch like this to the series!

> With the above fix I still however get 2 warnings from devres functions,
> but this is probably caused by adding the same entry 2 times to the list
> without proper refcounting... I will check that later.

Ah I see this regulator driver really excercise all corner cases of
these nonexclusive GPIO lines. (Which is good!)

Indeed devres is not going to like adding the same thing twice.

I just sent a fix for that, subject:
"gpio: devres: Handle nonexclusive GPIOs"
you could perhaps try it on top of this
series? I intend to merge that separately as a fix for current,
as it is a bug.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ