From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Linus Walleij <linus.walleij@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
nicolas.free@microchip.com
Subject: Re: [RFC PATCH 1/2] pinctrl: add consumer variant for gpio request
Date: Mon, 15 Jan 2018 22:19:39 +0200 [thread overview]
Message-ID: <CAHp75VdGp1_hwK7rUq4u_gKpypdV7LYhV4+kQoVb_u7D+a6pwA@mail.gmail.com> (raw)
In-Reply-To: <20180115162233.6205-2-ludovic.desroches@microchip.com>
On Mon, Jan 15, 2018 at 6:22 PM, Ludovic Desroches
<ludovic.desroches@microchip.com> wrote:
Did I miss cover letter for this?
> Add a consumer variant to GPIO request relative functions. The goal
> is to fix the bad ownership, which is arbitrary set to
> "range->name:gpio", of a GPIO.
Hmm... It's supposed to be name of the owner of the pin range (pin
control device name IIUC).
> There is a lack of configuration features for GPIO. For instance,
> we can't set the bias. Some pin controllers manage both device's
> pins and GPIOs. GPIOs can benefit from pin configuration. Usually,
> a pinctrl node is used to mux the pin as a GPIO and to set up its
> configuration.
Don't we have means to do that?
At least that what I see in aspeed_gpio_set_config().
Or I missed a point here?
> The pinmuxing strict mode involves that a pin which is muxed can't
> be requested as a GPIO if the owner is not the same.
Any elaborated example?
> Unfortunately,
> the ownership of a GPIO is set arbitrarily to "range->name:gpio".
> So there is a mismatch about the ownership which prevents a device
> from being the owner of the pinmuxing and requesting the same pin as
> a GPIO.
> Adding some consumer variants for GPIO request stuff will allow to
> pass the name of the device which requests the GPIO to not return an
> error if it's also the owner of the pinmuxing.
I think we need something more generic in core than producing more API
functions.
But I would like to get problem first.
> + if (consumer)
> + return pin_request(pctldev, pin, consumer, range);
> +
Hmm... My understanding that GPIO is just a (special) function out of
pin muxing. So, doing musing is essential to get proper function out
of it.
Does your hardware considers this differently? If so, I would really
want to see some datasheets.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2018-01-15 20:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 16:22 [RFC PATCH 0/2] fixing the gpio ownership Ludovic Desroches
2018-01-15 16:22 ` [RFC PATCH 1/2] pinctrl: add consumer variant for gpio request Ludovic Desroches
2018-01-15 20:19 ` Andy Shevchenko [this message]
2018-01-16 9:01 ` Ludovic Desroches
2018-01-16 14:33 ` Andy Shevchenko
2018-01-17 14:54 ` Ludovic Desroches
2018-01-17 16:07 ` Andy Shevchenko
2018-01-18 7:56 ` Ludovic Desroches
2018-01-18 9:46 ` Linus Walleij
2018-01-15 16:22 ` [RFC PATCH 2/2] gpio: provide a consumer when requesting a gpio Ludovic Desroches
-- strict thread matches above, loose matches on Subject: below --
2018-01-15 16:24 [RESEND RFC PATCH 0/2] fixing the gpio ownership Ludovic Desroches
2018-01-15 16:24 ` [RFC PATCH 1/2] pinctrl: add consumer variant for gpio request Ludovic Desroches
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=CAHp75VdGp1_hwK7rUq4u_gKpypdV7LYhV4+kQoVb_u7D+a6pwA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.free@microchip.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;
as well as URLs for NNTP newsgroup(s).