From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups
Date: Wed, 5 Dec 2018 15:30:22 +0100 [thread overview]
Message-ID: <b1ecf322-92bd-79e9-9c8c-b87a534afc11@samsung.com> (raw)
In-Reply-To: <CACRpkdbVSEYJpSb6Uzji158gL7WHu_Bfpw2gK-qo2s66dWjY7Q@mail.gmail.com>
Hi Linus,
On 2018-12-04 13:44, Linus Walleij wrote:
> On Tue, Dec 4, 2018 at 11:33 AM Marek Szyprowski
> <m.szyprowski@samsung.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.
Those 2 warnings were worrying me and I finally found! devres_*
functions require to pass a pointer to the pointer as match_data, so
desc must be passed as &desc to devres_find() and devres_destroy()
functions, otherwise they always return -ENOENT. I will comment
respective lines in your patches then.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2018-12-05 14:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181201154428epcas4p3a1a5c9c576027b1c56f8dd1510b32187@epcas4p3.samsung.com>
2018-12-01 15:41 ` Linus Walleij
2018-12-01 15:41 ` [PATCH 01/13 v2] regulator: core: Track dangling GPIO descriptors Linus Walleij
2018-12-01 15:41 ` [PATCH 02/13 v2] regulator: fixed: Let core handle GPIO descriptor Linus Walleij
2018-12-01 15:41 ` [PATCH 03/13 v2] regulator: lm363x: " Linus Walleij
2018-12-01 15:41 ` [PATCH 04/13 v2] regulator: lp8788-ldo: " Linus Walleij
2018-12-01 15:41 ` [PATCH 05/13 v2] regulator: max8952: " Linus Walleij
2018-12-01 15:41 ` [PATCH 06/13 v2] regulator: max8973: " Linus Walleij
2018-12-05 13:08 ` Charles Keepax
2018-12-01 15:41 ` [PATCH 07/13 v2] gpio: Export gpiod_get_from_of_node() Linus Walleij
2018-12-01 15:41 ` [PATCH 08/13 v2] regulator: max77686: Let core handle GPIO descriptor Linus Walleij
2018-12-01 15:41 ` [PATCH 09/13 v2] gpio: Add devm_gpiod_unhinge() Linus Walleij
2018-12-02 17:02 ` Bartosz Golaszewski
2018-12-01 15:41 ` [PATCH 10/13 v2] regulator: da9211: Hand over GPIO to regulator core Linus Walleij
2018-12-01 15:41 ` [PATCH 11/13 v2] regulator: s5m8767: " Linus Walleij
2018-12-01 15:41 ` [PATCH 12/13 v2] regulator: tps65090: " Linus Walleij
2018-12-01 15:41 ` [PATCH 13/13 v2] regulator: s2mps11: " Linus Walleij
2018-12-03 14:35 ` [PATCH 00/13 v2] Regulator ena_gpiod fixups Marek Szyprowski
2018-12-04 9:31 ` Linus Walleij
2018-12-04 10:33 ` Marek Szyprowski
2018-12-04 12:44 ` Linus Walleij
2018-12-05 14:30 ` Marek Szyprowski [this message]
2018-12-05 14:32 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1ecf322-92bd-79e9-9c8c-b87a534afc11@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®