linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jmondi <jacopo@jmondi.org>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Timur Tabi" <timur@codeaurora.org>,
	"Gregory CLEMENT" <gregory.clement@free-electrons.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	"Antoine Ténart" <antoine.tenart@free-electrons.com>,
	"Miquèl Raynal" <miquel.raynal@free-electrons.com>,
	"Nadav Haklai" <nadavh@marvell.com>
Subject: Re: linux-next regression caused by "gpiolib: request the gpio before querying its direction"
Date: Wed, 30 Aug 2017 18:24:40 +0200	[thread overview]
Message-ID: <20170830162440.GE1863@w540> (raw)
In-Reply-To: <20170830163255.4e7c1422@windsurf.lan>

Hello,

On Wed, Aug 30, 2017 at 04:32:55PM +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 30 Aug 2017 09:22:55 -0500, Timur Tabi wrote:
>
> > No, that's it.  The question is, what exactly should the 'request'
> > function do?  Should it be modifying the hardware to satisfy the
> > request?  When I wrote my patch, I assumed that it wouldn't.  I thought
> > that request simply answered the question, "can I touch this GPIO"?
>
> No, it also muxes the pin in GPIO, and you can see the "reference"
> implementation pinctrl-single also does it.
>
> Let's see what Linus W. has to say about the semantic of the "request"
> operation.
>
> But if we change the semantic of "request" to no longer mux the hardware
> as GPIO, then you will also have regressions, because there are plenty
> of GPIOs that are requested, but not explicitly muxed as GPIOs in the
> DT, precisely because today requesting a GPIO is sufficient to have it
> re-muxed as GPIO at the pinctrl level.

Just to point out one of Renesas' pin controller devices seems to
suffer from the same problem, introduced by Timur's commit

https://www.spinics.net/lists/linux-renesas-soc/msg17647.html

This is indeed caused by the "request" introduced by the above said
commit, that in rza1 pincontroller, actually muxes the requested
pin as GPIO.

Reverting that commit solves all the issues in our case too.

Thanks
   j
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-08-30 16:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  9:24 linux-next regression caused by "gpiolib: request the gpio before querying its direction" Thomas Petazzoni
2017-08-30 12:31 ` Timur Tabi
2017-08-30 13:59   ` Gregory CLEMENT
2017-08-30 14:17     ` Thomas Petazzoni
2017-08-30 14:22       ` Timur Tabi
2017-08-30 14:32         ` Thomas Petazzoni
2017-08-30 16:24           ` jmondi [this message]
2017-08-30 19:38             ` Geert Uytterhoeven
2017-08-31  7:08       ` Linus Walleij
2017-08-31  7:18         ` Thomas Petazzoni
2017-08-31  7:30           ` Geert Uytterhoeven
2017-08-31  9:22             ` Russell King - ARM Linux
2017-08-31  9:39               ` Thomas Petazzoni
2017-08-31 18:39                 ` Timur Tabi
2017-08-31  9:50               ` Geert Uytterhoeven
2017-08-31 13:05                 ` Timur Tabi
2017-08-31 10:08               ` Maxime Ripard
2017-08-31  7:04 ` 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=20170830162440.GE1863@w540 \
    --to=jacopo@jmondi.org \
    --cc=antoine.tenart@free-electrons.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=miquel.raynal@free-electrons.com \
    --cc=nadavh@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=timur@codeaurora.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;
as well as URLs for NNTP newsgroup(s).