All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 15/21] ARM: shmobile: armadillo-reference: Move st1232 reset GPIO to DT
Date: Fri, 24 May 2013 12:24:26 +0000	[thread overview]
Message-ID: <CANqRtoTVjBcsKVP=2jJ7ThC0gXuF-Xd-iByo7db53YhK1x+-wA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYUQjtmzFzQBES-bcjjT5iTTXifa2BQSusBzMdTCRtyiA@mail.gmail.com>

Hi Linus,

On Fri, May 24, 2013 at 5:59 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, May 21, 2013 at 2:14 PM, Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com> wrote:
>
>> Reference the st1232 reset GPIO from the device tree and remove it from
>> board code.
>>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
>> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> @@ -43,6 +43,7 @@
>>                 interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */
>>                 pinctrl-0 = <&st1232_pins>;
>>                 pinctrl-names = "default";
>> +               gpios = <&pfc 166 1>;
>
> Just as a random example this becomes:
>
> gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
>
> Which is WAAAY more readable.

Yes, agreed, even grumpy me starts thinking this looks good. =)

>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> @@ -158,7 +158,6 @@ clock_error:
>>   */
>>  static void __init eva_init(void)
>>  {
>> -
>>         r8a7740_clock_init(MD_CK0 | MD_CK2);
>>         eva_clock_init();
>>
>> @@ -171,12 +170,6 @@ static void __init eva_init(void)
>>
>>         r8a7740_add_standard_devices_dt();
>>
>> -       /*
>> -        * Touchscreen
>> -        * TODO: Move reset GPIO over to .dts when we can reference it
>> -        */
>> -       gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
>> -
>
> Not really my business but I guess the driver is already augmented to pick its
> GPIO from the device tree in this case? And are you willingly breaking
> non-DT boots or something?

Regarding dependency handing of driver and board code, I believe
Laurent has us covered.

As for breaking non-DT boot, under mach-shmobile the code for DT
"-reference" board support is DT only so judging by the file name this
kind of change should be fine.

Thanks,

/ magnus

WARNING: multiple messages have this Message-ID (diff)
From: Magnus Damm <magnus.damm@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Magnus Damm <damm@opensource.se>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH v4 15/21] ARM: shmobile: armadillo-reference: Move st1232 reset GPIO to DT
Date: Fri, 24 May 2013 21:24:26 +0900	[thread overview]
Message-ID: <CANqRtoTVjBcsKVP=2jJ7ThC0gXuF-Xd-iByo7db53YhK1x+-wA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYUQjtmzFzQBES-bcjjT5iTTXifa2BQSusBzMdTCRtyiA@mail.gmail.com>

Hi Linus,

On Fri, May 24, 2013 at 5:59 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, May 21, 2013 at 2:14 PM, Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com> wrote:
>
>> Reference the st1232 reset GPIO from the device tree and remove it from
>> board code.
>>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
>> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> @@ -43,6 +43,7 @@
>>                 interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */
>>                 pinctrl-0 = <&st1232_pins>;
>>                 pinctrl-names = "default";
>> +               gpios = <&pfc 166 1>;
>
> Just as a random example this becomes:
>
> gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
>
> Which is WAAAY more readable.

Yes, agreed, even grumpy me starts thinking this looks good. =)

>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> @@ -158,7 +158,6 @@ clock_error:
>>   */
>>  static void __init eva_init(void)
>>  {
>> -
>>         r8a7740_clock_init(MD_CK0 | MD_CK2);
>>         eva_clock_init();
>>
>> @@ -171,12 +170,6 @@ static void __init eva_init(void)
>>
>>         r8a7740_add_standard_devices_dt();
>>
>> -       /*
>> -        * Touchscreen
>> -        * TODO: Move reset GPIO over to .dts when we can reference it
>> -        */
>> -       gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
>> -
>
> Not really my business but I guess the driver is already augmented to pick its
> GPIO from the device tree in this case? And are you willingly breaking
> non-DT boots or something?

Regarding dependency handing of driver and board code, I believe
Laurent has us covered.

As for breaking non-DT boot, under mach-shmobile the code for DT
"-reference" board support is DT only so judging by the file name this
kind of change should be fine.

Thanks,

/ magnus

WARNING: multiple messages have this Message-ID (diff)
From: magnus.damm@gmail.com (Magnus Damm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 15/21] ARM: shmobile: armadillo-reference: Move st1232 reset GPIO to DT
Date: Fri, 24 May 2013 21:24:26 +0900	[thread overview]
Message-ID: <CANqRtoTVjBcsKVP=2jJ7ThC0gXuF-Xd-iByo7db53YhK1x+-wA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdYUQjtmzFzQBES-bcjjT5iTTXifa2BQSusBzMdTCRtyiA@mail.gmail.com>

Hi Linus,

On Fri, May 24, 2013 at 5:59 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, May 21, 2013 at 2:14 PM, Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com> wrote:
>
>> Reference the st1232 reset GPIO from the device tree and remove it from
>> board code.
>>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
>> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> @@ -43,6 +43,7 @@
>>                 interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */
>>                 pinctrl-0 = <&st1232_pins>;
>>                 pinctrl-names = "default";
>> +               gpios = <&pfc 166 1>;
>
> Just as a random example this becomes:
>
> gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
>
> Which is WAAAY more readable.

Yes, agreed, even grumpy me starts thinking this looks good. =)

>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> @@ -158,7 +158,6 @@ clock_error:
>>   */
>>  static void __init eva_init(void)
>>  {
>> -
>>         r8a7740_clock_init(MD_CK0 | MD_CK2);
>>         eva_clock_init();
>>
>> @@ -171,12 +170,6 @@ static void __init eva_init(void)
>>
>>         r8a7740_add_standard_devices_dt();
>>
>> -       /*
>> -        * Touchscreen
>> -        * TODO: Move reset GPIO over to .dts when we can reference it
>> -        */
>> -       gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
>> -
>
> Not really my business but I guess the driver is already augmented to pick its
> GPIO from the device tree in this case? And are you willingly breaking
> non-DT boots or something?

Regarding dependency handing of driver and board code, I believe
Laurent has us covered.

As for breaking non-DT boot, under mach-shmobile the code for DT
"-reference" board support is DT only so judging by the file name this
kind of change should be fine.

Thanks,

/ magnus

  reply	other threads:[~2013-05-24 12:24 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 12:14 [PATCH v4 00/21] SH pinctrl DT support Laurent Pinchart
2013-05-21 12:14 ` Laurent Pinchart
2013-05-21 12:14 ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 01/21] sh-pfc: Remove support for platform data Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-24  8:23   ` Linus Walleij
2013-05-24  8:23     ` Linus Walleij
2013-05-24  8:23     ` Linus Walleij
2013-05-21 12:14 ` [PATCH v4 02/21] sh-pfc: Add DT support Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-24  8:52   ` Linus Walleij
2013-05-24  8:52     ` Linus Walleij
2013-05-24  8:52     ` Linus Walleij
2013-05-29  8:01     ` Laurent Pinchart
2013-05-29  8:01       ` Laurent Pinchart
2013-05-29  8:01       ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 03/21] ARM: shmobile: r8a73a4: Add pin control device to device tree Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 04/21] ARM: shmobile: r8a7740: " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 05/21] ARM: shmobile: r8a7778: " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 06/21] ARM: shmobile: r8a7778: Add GPIO controller devices " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 07/21] ARM: shmobile: r8a7779: Add pin control device " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 08/21] ARM: shmobile: r8a7779: Add GPIO controller devices " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 09/21] ARM: shmobile: r8a7790: Add pin control device " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 10/21] ARM: shmobile: r8a7790: Add GPIO controller devices " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 11/21] ARM: shmobile: sh7372: Add pin control device " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 12/21] ARM: shmobile: sh73a0: " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 13/21] ARM: shmobile: armadillo-reference: Move pinctrl mappings " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 14/21] ARM: shmobile: armadillo-reference: Add st1232 pin mappings Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 15/21] ARM: shmobile: armadillo-reference: Move st1232 reset GPIO to DT Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-24  8:59   ` Linus Walleij
2013-05-24  8:59     ` Linus Walleij
2013-05-24  8:59     ` Linus Walleij
2013-05-24 12:24     ` Magnus Damm [this message]
2013-05-24 12:24       ` Magnus Damm
2013-05-24 12:24       ` Magnus Damm
2013-05-29  8:01     ` Laurent Pinchart
2013-05-29  8:01       ` Laurent Pinchart
2013-05-29  8:01       ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 16/21] ARM: shmobile: armadillo-reference: Add LED1-LED4 to the device tree Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 17/21] ARM: shmobile: kzm9g-reference: Move pinctrl mappings to " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 18/21] ARM: shmobile: kzm9g-reference: Move SDHI regulators to DT Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 19/21] ARM: shmobile: kzm9g-reference: Add LED1-LED4 to the device tree Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 20/21] ARM: shmobile: marzen-reference: Move pinctrl mappings to " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14 ` [PATCH v4 21/21] ARM: shmobile: marzen-reference: Add LED2-LED4 to the " Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart
2013-05-21 12:14   ` Laurent Pinchart

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='CANqRtoTVjBcsKVP=2jJ7ThC0gXuF-Xd-iByo7db53YhK1x+-wA@mail.gmail.com' \
    --to=magnus.damm@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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.