All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Miquèl Raynal" <miquel.raynal@free-electrons.com>,
	"Nadav Haklai" <nadavh@marvell.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"Antoine Ténart" <antoine.tenart@free-electrons.com>,
	"Gregory CLEMENT" <gregory.clement@free-electrons.com>,
	"Timur Tabi" <timur@codeaurora.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: linux-next regression caused by "gpiolib: request the gpio before querying its direction"
Date: Thu, 31 Aug 2017 11:39:35 +0200	[thread overview]
Message-ID: <20170831113935.38028ff8@windsurf.lan> (raw)
In-Reply-To: <20170831092211.GP20805@n2100.armlinux.org.uk>

Hello,

On Thu, 31 Aug 2017 10:22:12 +0100, Russell King - ARM Linux wrote:

> What about hardware which you can configure for some alternate function
> but still monitor the pin via GPIO, even though it's not mux'd as GPIO.
> 
> For instance, you may have a timer block which can capture on both
> edges of an external event signal, which needs the pin to be muxed for
> that function.  However, you need to read the state of the pin, and
> that is only available through GPIO.  Muxing the pin to be a GPIO just
> because someone requests the GPIO is, imho, ill thought-out and breaks
> some use cases.
> 
> IMHO, the pinmux settings should always be specified in DT, and that's
> what we should be using everywhere, not doing broken backdoor games like
> "the gpio is being requested, it's obvious that we want this pin to be
> a gpio" - that really doesn't follow.

Agreed.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-next regression caused by "gpiolib: request the gpio before querying its direction"
Date: Thu, 31 Aug 2017 11:39:35 +0200	[thread overview]
Message-ID: <20170831113935.38028ff8@windsurf.lan> (raw)
In-Reply-To: <20170831092211.GP20805@n2100.armlinux.org.uk>

Hello,

On Thu, 31 Aug 2017 10:22:12 +0100, Russell King - ARM Linux wrote:

> What about hardware which you can configure for some alternate function
> but still monitor the pin via GPIO, even though it's not mux'd as GPIO.
> 
> For instance, you may have a timer block which can capture on both
> edges of an external event signal, which needs the pin to be muxed for
> that function.  However, you need to read the state of the pin, and
> that is only available through GPIO.  Muxing the pin to be a GPIO just
> because someone requests the GPIO is, imho, ill thought-out and breaks
> some use cases.
> 
> IMHO, the pinmux settings should always be specified in DT, and that's
> what we should be using everywhere, not doing broken backdoor games like
> "the gpio is being requested, it's obvious that we want this pin to be
> a gpio" - that really doesn't follow.

Agreed.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-08-31  9:57 UTC|newest]

Thread overview: 36+ 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  9:24 ` Thomas Petazzoni
2017-08-30 12:31 ` Timur Tabi
2017-08-30 12:31   ` Timur Tabi
2017-08-30 13:59   ` Gregory CLEMENT
2017-08-30 13:59     ` Gregory CLEMENT
2017-08-30 14:17     ` Thomas Petazzoni
2017-08-30 14:17       ` Thomas Petazzoni
2017-08-30 14:22       ` Timur Tabi
2017-08-30 14:22         ` Timur Tabi
2017-08-30 14:32         ` Thomas Petazzoni
2017-08-30 14:32           ` Thomas Petazzoni
2017-08-30 16:24           ` jmondi
2017-08-30 16:24             ` jmondi
2017-08-30 19:38             ` Geert Uytterhoeven
2017-08-30 19:38               ` Geert Uytterhoeven
2017-08-31  7:08       ` Linus Walleij
2017-08-31  7:08         ` Linus Walleij
2017-08-31  7:18         ` Thomas Petazzoni
2017-08-31  7:18           ` Thomas Petazzoni
2017-08-31  7:30           ` Geert Uytterhoeven
2017-08-31  7:30             ` Geert Uytterhoeven
2017-08-31  9:22             ` Russell King - ARM Linux
2017-08-31  9:22               ` Russell King - ARM Linux
2017-08-31  9:39               ` Thomas Petazzoni [this message]
2017-08-31  9:39                 ` Thomas Petazzoni
2017-08-31 18:39                 ` Timur Tabi
2017-08-31 18:39                   ` Timur Tabi
2017-08-31  9:50               ` Geert Uytterhoeven
2017-08-31  9:50                 ` Geert Uytterhoeven
2017-08-31 13:05                 ` Timur Tabi
2017-08-31 13:05                   ` Timur Tabi
2017-08-31 10:08               ` Maxime Ripard
2017-08-31 10:08                 ` Maxime Ripard
2017-08-31  7:04 ` Linus Walleij
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=20170831113935.38028ff8@windsurf.lan \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=antoine.tenart@free-electrons.com \
    --cc=geert@linux-m68k.org \
    --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=linux@armlinux.org.uk \
    --cc=miquel.raynal@free-electrons.com \
    --cc=nadavh@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.