linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-gpio@vger.kernel.org, Eric Anholt <eric@anholt.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC V2 3/4] pinctrl: bcm2835: activate strict mux mode
Date: Mon, 21 Jan 2019 10:57:37 +0100	[thread overview]
Message-ID: <db62122f-00fc-b251-6fa7-7d02a4d7d9c5@i2se.com> (raw)
In-Reply-To: <20190121073419.iosy3bd6tcnexya7@wunner.de>

Am 21.01.19 um 08:34 schrieb Lukas Wunner:
> On Mon, Jan 21, 2019 at 08:11:24AM +0100, Stefan Wahren wrote:
>> This activates strict mode muxing for the bcm2835 pin controller,
>> as the GPIO Function Select Registers do not allow GPIO and functions
>> at the same time.
> bcm2835_spi_setup() in spi-bcm2835.c converts a native chip select
> to a gpio chip select.  So pins 7+8 and/or 35+36 may be set to
> function alt0 but in reality the pins are requested and driven as
> generic output gpio pins.
>
> I'm not sure but doesn't this break in strict mode?

That's a good point. I hope that isn't a problem because owner should be
the same.

But i didn't test this scenario. Do you mind to give this series a try?

The only issue i found so far was a unnecessary pinctrl on the Raspberry
Pi Zero W, which should be fixed with this [1].

At the end we need to switch to strict mode, because currently a simple
gpioset can "destroy" the mux setting for I2C or SPI.

[1] - https://marc.info/?l=linux-arm-kernel&m=154800402627578

>
> Thanks,
>
> Lukas
>

  parent reply	other threads:[~2019-01-21  9:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21  7:11 [PATCH RFC V2 0/4] pinctrl: bcm2835: improve libgpiod output Stefan Wahren
2019-01-21  7:11 ` [PATCH RFC V2 1/4] pinctrl: bcm2835: declare pin config as generic Stefan Wahren
2019-01-28  8:02   ` Linus Walleij
2019-01-21  7:11 ` [PATCH RFC V2 2/4] pinctrl: bcm2835: Direct GPIO config changes to generic pinctrl Stefan Wahren
2019-01-21  7:11 ` [PATCH RFC V2 3/4] pinctrl: bcm2835: activate strict mux mode Stefan Wahren
     [not found]   ` <20190121073419.iosy3bd6tcnexya7@wunner.de>
2019-01-21  9:57     ` Stefan Wahren [this message]
2019-01-21  7:11 ` [PATCH RFC V2 4/4] gpiolib: Take MUX usage into account Stefan Wahren
2019-01-28  9:06   ` Linus Walleij
2019-01-28  8:06 ` [PATCH RFC V2 0/4] pinctrl: bcm2835: improve libgpiod output Linus Walleij
2019-01-28  9:23   ` Stefan Wahren

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=db62122f-00fc-b251-6fa7-7d02a4d7d9c5@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=eric@anholt.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=pbrobinson@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;
as well as URLs for NNTP newsgroup(s).