From: Mark Brown <broonie@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Alexander Shiyan <shc_work@mail.ru>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Mike Rapoport <rppt@linux.vnet.ibm.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Philipp Zabel <philipp.zabel@gmail.com>,
Daniel Mack <zonque@gmail.com>,
Marc Zyngier <marc.zyngier@arm.com>, jacopo <jacopo@jmondi.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Russell King <rmk+kernel@armlinux.org.uk>
Subject: Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only
Date: Thu, 11 Oct 2018 14:15:36 +0100 [thread overview]
Message-ID: <20181011131536.GA25351@sirena.org.uk> (raw)
In-Reply-To: <20181011094701eucas1p2177080d98481b4d4ebcfad9960d7dd97~chNSImIbW1044610446eucas1p2Q@eucas1p2.samsung.com>
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
On Thu, Oct 11, 2018 at 11:46:59AM +0200, Marek Szyprowski wrote:
> On 2018-10-11 11:29, Linus Walleij wrote:
> > On Thu, Oct 11, 2018 at 11:01 AM Marek Szyprowski
> >> I've just noticed that this patch causes regression on Samsung
> >> Exynos4412-based Trats2 board. Conversion to GPIO descriptor breaks
> >> operation when regulators used shared GPIO: sii9234 i2c driver
> >> is not able to get vcc33mhl regulator (it uses shared GPIO enable
> >> line with vsil12 regulator).
> > So I guess this means that this physical GPIO line will enable the
> > vcc33mhl and the vsil12 regulators at the same time?
> Right. It is so common case, that regulator core has special code for
> handling shared enable GPIO.
Yes, and we've discussed it several times already.
> > I was aware of the usecase "several consumers takes the same
> > GPIO line" (Mark told me several times...) so it was in the back of
> > my mind, but it's just hard to see when we were gonna run into it.
> > So it is the fixed regulators, on Samsung boards, I see.
> I don't think this is Samsung specific. I saw similar solution on various
> other boards too. Sharing enable gpio is rather common thing. The issue
> happens if there are separate drivers for each hw block and they need to
> enable it from their code.
It's really common, yeah - things like controlling the power for an
entire chip with one GPIO for all the regulators supplying that chip for
example. I think what you're seeing here is that Samsung are among the
most active testers of -next (thanks!) rather than that their hardware
is particularly weird.
> > So I was thinking to introduce
> > gpiod_get_nonexclusive() to explicitly handle this case for the few
> > systems that use shared GPIO lines, let me see what I can do.
> The old interface also didn't allow sharing GPIO easily, so regulator
> core has special code for shared enable gpio. However I still have no
> idea how to do this cleanly using descriptor.
Yes, it's been discussed several times and I thought Linus had some idea
for it - IIRC it was a gpiod_is_equal() or something. You can also do
this by converting descriptors back to numbers and comparing the numbers
but obviously the numbers are supposed to be being removed.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-10-11 13:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181011090112eucas1p286d8c1edfc1a2a207d8a11c5ad7eb20e@eucas1p2.samsung.com>
2018-09-06 12:24 ` [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only Linus Walleij
2018-09-10 17:01 ` Janusz Krzysztofik
2018-09-11 16:06 ` Mike Rapoport
2018-09-28 23:32 ` John Stultz
2018-09-29 17:38 ` Linus Walleij
2018-10-01 18:53 ` Leonard Crestez
2018-10-01 20:16 ` Linus Walleij
2018-10-01 20:37 ` Fabio Estevam
2018-10-01 20:48 ` Linus Walleij
2018-10-11 9:01 ` Marek Szyprowski
2018-10-11 9:29 ` Linus Walleij
2018-10-11 9:46 ` Marek Szyprowski
2018-10-11 13:15 ` Mark Brown [this message]
2018-10-11 15:00 ` Jon Hunter
2018-10-11 15:34 ` Marcel Ziswiler
2018-10-11 17:47 ` Linus Walleij
2018-10-12 9:43 ` Marcel Ziswiler
2018-10-12 10:39 ` Jon Hunter
2018-10-12 10:43 ` Russell King - ARM Linux
2018-10-12 11:03 ` Linus Walleij
2018-10-12 11:43 ` Marcel Ziswiler
2018-10-12 12:59 ` Russell King - ARM Linux
2018-10-12 13:13 ` Marcel Ziswiler
2018-10-12 16:57 ` Mark Brown
2018-10-12 13:58 ` Andy Shevchenko
2018-10-12 16:17 ` Mark Brown
2018-10-11 17:45 ` Linus Walleij
2018-10-12 10:25 ` Jon Hunter
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=20181011131536.GA25351@sirena.org.uk \
--to=broonie@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=geert+renesas@glider.be \
--cc=haojian.zhuang@gmail.com \
--cc=jacopo@jmondi.org \
--cc=jmkrzyszt@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=marc.zyngier@arm.com \
--cc=philipp.zabel@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robert.jarzmik@free.fr \
--cc=rppt@linux.vnet.ibm.com \
--cc=shc_work@mail.ru \
--cc=zonque@gmail.com \
/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