linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Haojian Zhuang" <haojian.zhuang@linaro.org>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Mika Penttilä" <mika.penttila@nextfour.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Nishanth Menon" <nm@ti.com>, "Shawn Guo" <shawnguo@kernel.org>,
	"Stefan Agner" <stefan@agner.ch>
Subject: Re: [PATCH] pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()
Date: Mon, 3 Apr 2017 11:06:30 +0200	[thread overview]
Message-ID: <CAAMH-yu3H3dNCC7yes6SmthUbqTERTsyPh3ynz=2COXstmKfkQ@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdW6=gyf6=i2n2cpRMzFj6oiM0n7nusK9ev7WraWpwX7DA@mail.gmail.com>

Tony, All,

On Mon, Apr 3, 2017 at 10:46 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Tony,
>
> On Thu, Mar 30, 2017 at 6:16 PM, Tony Lindgren <tony@atomide.com> wrote:
> > Recent pinctrl changes to allow dynamic allocation of pins exposed one
> > more issue with the pinctrl pins claimed early by the controller itself.
> > This caused a regression for IMX6 pinctrl hogs.
> >
> > Before enabling the pin controller driver we need to wait until it has
> > been properly initialized, then claim the hogs, and only then enable it.
> >
> > To fix the regression, split the code into pinctrl_claim_hogs() and
> > pinctrl_enable(). And then let's require that pinctrl_enable() is always
> > called by the pin controller driver when ready after calling
> > pinctrl_register_and_init().
> >
> > Depends-on: 950b0d91dc10 ("pinctrl: core: Fix regression caused by delayed
> > work for hogs")
> > Fixes: df61b366af26 ("pinctrl: core: Use delayed work for hogs")
> > Fixes: e566fc11ea76 ("pinctrl: imx: use generic pinctrl helpers for
> > managing groups")
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: Gary Bisson <gary.bisson@boundarydevices.com>
> > Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> > Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Cc: Mika Penttilä <mika.penttila@nextfour.com>
> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Cc: Nishanth Menon <nm@ti.com>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Stefan Agner <stefan@agner.ch>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> The display on r8a7740-armadillo800eva still works, so the GPIO hog
> needed for that is OK.
>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

For imx, tested on a Nitrogen6x platform:

Before the patch:
# dmesg | grep iomux
[    0.096672] imx6q-pinctrl 20e0000.iomuxc: unable to find group for
node hoggrp
[    0.097215] imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver

After the patch:
# dmesg | grep iomux
[    0.097505] imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver

Also, checking the pinctrl of the hog pins in sysfs proved to be correct.

Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>

Regards,
Gary

  reply	other threads:[~2017-04-03  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30 16:16 [PATCH] pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable() Tony Lindgren
2017-04-03  8:46 ` Geert Uytterhoeven
2017-04-03  9:06   ` Gary Bisson [this message]
2017-04-03 12:00 ` Fabio Estevam
2017-04-06 23:10 ` 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='CAAMH-yu3H3dNCC7yes6SmthUbqTERTsyPh3ynz=2COXstmKfkQ@mail.gmail.com' \
    --to=gary.bisson@boundarydevices.com \
    --cc=festevam@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.penttila@nextfour.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nm@ti.com \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    --cc=tony@atomide.com \
    --cc=yamada.masahiro@socionext.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).