From: jmondi <jacopo@jmondi.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Magnus Damm <magnus.damm@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
linux-sh@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix pinctrl registration
Date: Wed, 10 May 2017 09:31:52 +0200 [thread overview]
Message-ID: <20170510073152.GA10602@w540> (raw)
In-Reply-To: <1494339117-31221-2-git-send-email-geert+renesas@glider.be>
Hi Geert,
On Tue, May 09, 2017 at 04:11:54PM +0200, Geert Uytterhoeven wrote:
> On sh7722/Migo-R, pinctrl registration fails with:
>
> sh-pfc pfc-sh7722: pin 0 already registered
> sh-pfc pfc-sh7722: error during pin registration
> sh-pfc pfc-sh7722: could not register: -22
> sh-pfc: probe of pfc-sh7722 failed with error -22
>
> pinmux_pins[] is initialized through PINMUX_GPIO(), using designated
> array initializers, where the GPIO_* enums serve as indices.
> As GPIO_PTQ7 is defined in the enum, but never used, pinmux_pins[]
> contains a (zero-filled) hole. Hence this entry is treated as pin zero,
> which was registered before, and initialization fails.
>
> According to the datasheet, port PTQ7 does not exist. Hence remove
> GPIO_PTQ7 from the enum to fix this.
>
> Fixes: 8d7b5b0af7e070b9 ("sh: Add sh7722 pinmux code")
> Reported-by: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Thank you
j
> ---
> Tested on sh7722/Migo-R.
> ---
> arch/sh/include/cpu-sh4/cpu/sh7722.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
> index 3bb74e534d0f8ca4..78961ab78a5a9c83 100644
> --- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
> +++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
> @@ -67,7 +67,7 @@ enum {
> GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
>
> /* PTQ */
> - GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
> + GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
> GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
>
> /* PTR */
> --
> 2.7.4
>
WARNING: multiple messages have this Message-ID (diff)
From: jmondi <jacopo@jmondi.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Magnus Damm <magnus.damm@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
linux-sh@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix pinctrl registration
Date: Wed, 10 May 2017 07:31:52 +0000 [thread overview]
Message-ID: <20170510073152.GA10602@w540> (raw)
In-Reply-To: <1494339117-31221-2-git-send-email-geert+renesas@glider.be>
Hi Geert,
On Tue, May 09, 2017 at 04:11:54PM +0200, Geert Uytterhoeven wrote:
> On sh7722/Migo-R, pinctrl registration fails with:
>
> sh-pfc pfc-sh7722: pin 0 already registered
> sh-pfc pfc-sh7722: error during pin registration
> sh-pfc pfc-sh7722: could not register: -22
> sh-pfc: probe of pfc-sh7722 failed with error -22
>
> pinmux_pins[] is initialized through PINMUX_GPIO(), using designated
> array initializers, where the GPIO_* enums serve as indices.
> As GPIO_PTQ7 is defined in the enum, but never used, pinmux_pins[]
> contains a (zero-filled) hole. Hence this entry is treated as pin zero,
> which was registered before, and initialization fails.
>
> According to the datasheet, port PTQ7 does not exist. Hence remove
> GPIO_PTQ7 from the enum to fix this.
>
> Fixes: 8d7b5b0af7e070b9 ("sh: Add sh7722 pinmux code")
> Reported-by: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Thank you
j
> ---
> Tested on sh7722/Migo-R.
> ---
> arch/sh/include/cpu-sh4/cpu/sh7722.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h
> index 3bb74e534d0f8ca4..78961ab78a5a9c83 100644
> --- a/arch/sh/include/cpu-sh4/cpu/sh7722.h
> +++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h
> @@ -67,7 +67,7 @@ enum {
> GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
>
> /* PTQ */
> - GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
> + GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
> GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
>
> /* PTR */
> --
> 2.7.4
>
next prev parent reply other threads:[~2017-05-10 7:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 14:11 [PATCH/RFC 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
2017-05-09 14:11 ` Geert Uytterhoeven
2017-05-09 14:11 ` [PATCH 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix " Geert Uytterhoeven
2017-05-09 14:11 ` Geert Uytterhoeven
2017-05-10 7:31 ` jmondi [this message]
2017-05-10 7:31 ` jmondi
2017-05-09 14:11 ` [PATCH 2/4] [RFC] sh: sh7757: Remove nonexistent GPIO_PT[JLNQ]7_RESV " Geert Uytterhoeven
2017-05-09 14:11 ` Geert Uytterhoeven
2017-05-09 14:11 ` [PATCH 3/4] sh: sh7264: Remove nonexistent GPIO_PH[0-7] " Geert Uytterhoeven
2017-05-09 14:11 ` Geert Uytterhoeven
2017-05-09 14:11 ` [PATCH 4/4] [RFC] sh: sh7269: " Geert Uytterhoeven
2017-05-09 14:11 ` Geert Uytterhoeven
2017-05-09 15:44 ` [PATCH/RFC 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix " Laurent Pinchart
2017-05-09 15:44 ` Laurent Pinchart
2017-05-09 15:53 ` Phil Edworthy
2017-05-09 15:53 ` Phil Edworthy
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=20170510073152.GA10602@w540 \
--to=jacopo@jmondi.org \
--cc=dalias@libc.org \
--cc=geert+renesas@glider.be \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=phil.edworthy@renesas.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
--cc=ysato@users.sourceforge.jp \
/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.