All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: dts: vf-colibri: split PWM pinctrl
Date: Mon, 21 Dec 2015 21:46:40 +0800	[thread overview]
Message-ID: <20151221134541.GD18410@tiger> (raw)
In-Reply-To: <86e283b5c7ed5f54ef25c9ff7e747834@agner.ch>

On Sun, Dec 13, 2015 at 06:53:35PM -0800, Stefan Agner wrote:
> On 2015-12-13 18:18, Shawn Guo wrote:
> > On Wed, Dec 02, 2015 at 02:11:46PM -0800, Stefan Agner wrote:
> >> Split PWM pins into separate pinctrl nodes to allow overrides which
> >> select pins individually. This is useful for carrier boards which use
> >> only one pin for PWM and would like to use the other pin for a
> >> different purpose.
> >>
> >> Signed-off-by: Stefan Agner <stefan@agner.ch>
> >> ---
> >>  arch/arm/boot/dts/vf-colibri.dtsi | 18 ++++++++++++++----
> >>  1 file changed, 14 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
> >> index e5949b9..924b660 100644
> >> --- a/arch/arm/boot/dts/vf-colibri.dtsi
> >> +++ b/arch/arm/boot/dts/vf-colibri.dtsi
> >> @@ -74,12 +74,12 @@
> >>
> >>  &pwm0 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm0>;
> >> +	pinctrl-0 = <&pinctrl_pwm0_a &pinctrl_pwm0_c>;
> >>  };
> >>
> >>  &pwm1 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm1>;
> >> +	pinctrl-0 = <&pinctrl_pwm1_b &pinctrl_pwm1_d>;
> >>  };
> > 
> > It may make more sense to define these pwm nodes in the final board
> > level dts with only defining the pins that are actually used on the
> > board.
> 
> Well, if we follow that policy, we would have to remove almost anything
> from the -colibri.dtsi device trees...
> 
> The Colibri standard defines standard functionality, which is kept
> compatible across modules with different SoC's. However, on almost all
> pins different functionality is available, and we have some customer
> which make use that....
> 
> So far we followed the policy that we define the pin/device
> configuration of the standard functionality in the -colibri.dtsi files
> (since this is the most used functionality). This allows us to also
> "bug-fix" standard functionality without having to touch customers
> (often out-of-tree) device trees.
> 
> This change is not different from that approach, it merely splits the
> pin configuration in two individual pinctrl nodes. This makes sense for
> PWM signals since they can be used individually (compared to, lets say,
> I2C, where it is more like "all or nothing")...  It turned out that
> several customers used PWM<A> for the display back light, while using
> PWM<C> in a different function, therefor that change.

Okay, sounds reasonable.  But please be consistent on the naming.  I
would expect the pin groups named in scheme
pinctrl_<device><0,1,2...>_<a,b,c...>.  That said, in this case of pwm,
they should be something like below.

 - pinctrl_pwm0_a
 - pinctrl_pwm0_b
 - pinctrl_pwm1_a
 - pinctrl_pwm1_b

Shawn

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] ARM: dts: vf-colibri: split PWM pinctrl
Date: Mon, 21 Dec 2015 21:46:40 +0800	[thread overview]
Message-ID: <20151221134541.GD18410@tiger> (raw)
In-Reply-To: <86e283b5c7ed5f54ef25c9ff7e747834-XLVq0VzYD2Y@public.gmane.org>

On Sun, Dec 13, 2015 at 06:53:35PM -0800, Stefan Agner wrote:
> On 2015-12-13 18:18, Shawn Guo wrote:
> > On Wed, Dec 02, 2015 at 02:11:46PM -0800, Stefan Agner wrote:
> >> Split PWM pins into separate pinctrl nodes to allow overrides which
> >> select pins individually. This is useful for carrier boards which use
> >> only one pin for PWM and would like to use the other pin for a
> >> different purpose.
> >>
> >> Signed-off-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
> >> ---
> >>  arch/arm/boot/dts/vf-colibri.dtsi | 18 ++++++++++++++----
> >>  1 file changed, 14 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
> >> index e5949b9..924b660 100644
> >> --- a/arch/arm/boot/dts/vf-colibri.dtsi
> >> +++ b/arch/arm/boot/dts/vf-colibri.dtsi
> >> @@ -74,12 +74,12 @@
> >>
> >>  &pwm0 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm0>;
> >> +	pinctrl-0 = <&pinctrl_pwm0_a &pinctrl_pwm0_c>;
> >>  };
> >>
> >>  &pwm1 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm1>;
> >> +	pinctrl-0 = <&pinctrl_pwm1_b &pinctrl_pwm1_d>;
> >>  };
> > 
> > It may make more sense to define these pwm nodes in the final board
> > level dts with only defining the pins that are actually used on the
> > board.
> 
> Well, if we follow that policy, we would have to remove almost anything
> from the -colibri.dtsi device trees...
> 
> The Colibri standard defines standard functionality, which is kept
> compatible across modules with different SoC's. However, on almost all
> pins different functionality is available, and we have some customer
> which make use that....
> 
> So far we followed the policy that we define the pin/device
> configuration of the standard functionality in the -colibri.dtsi files
> (since this is the most used functionality). This allows us to also
> "bug-fix" standard functionality without having to touch customers
> (often out-of-tree) device trees.
> 
> This change is not different from that approach, it merely splits the
> pin configuration in two individual pinctrl nodes. This makes sense for
> PWM signals since they can be used individually (compared to, lets say,
> I2C, where it is more like "all or nothing")...  It turned out that
> several customers used PWM<A> for the display back light, while using
> PWM<C> in a different function, therefor that change.

Okay, sounds reasonable.  But please be consistent on the naming.  I
would expect the pin groups named in scheme
pinctrl_<device><0,1,2...>_<a,b,c...>.  That said, in this case of pwm,
they should be something like below.

 - pinctrl_pwm0_a
 - pinctrl_pwm0_b
 - pinctrl_pwm1_a
 - pinctrl_pwm1_b

Shawn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Stefan Agner <stefan@agner.ch>
Cc: kernel@pengutronix.de, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: dts: vf-colibri: split PWM pinctrl
Date: Mon, 21 Dec 2015 21:46:40 +0800	[thread overview]
Message-ID: <20151221134541.GD18410@tiger> (raw)
In-Reply-To: <86e283b5c7ed5f54ef25c9ff7e747834@agner.ch>

On Sun, Dec 13, 2015 at 06:53:35PM -0800, Stefan Agner wrote:
> On 2015-12-13 18:18, Shawn Guo wrote:
> > On Wed, Dec 02, 2015 at 02:11:46PM -0800, Stefan Agner wrote:
> >> Split PWM pins into separate pinctrl nodes to allow overrides which
> >> select pins individually. This is useful for carrier boards which use
> >> only one pin for PWM and would like to use the other pin for a
> >> different purpose.
> >>
> >> Signed-off-by: Stefan Agner <stefan@agner.ch>
> >> ---
> >>  arch/arm/boot/dts/vf-colibri.dtsi | 18 ++++++++++++++----
> >>  1 file changed, 14 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
> >> index e5949b9..924b660 100644
> >> --- a/arch/arm/boot/dts/vf-colibri.dtsi
> >> +++ b/arch/arm/boot/dts/vf-colibri.dtsi
> >> @@ -74,12 +74,12 @@
> >>
> >>  &pwm0 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm0>;
> >> +	pinctrl-0 = <&pinctrl_pwm0_a &pinctrl_pwm0_c>;
> >>  };
> >>
> >>  &pwm1 {
> >>  	pinctrl-names = "default";
> >> -	pinctrl-0 = <&pinctrl_pwm1>;
> >> +	pinctrl-0 = <&pinctrl_pwm1_b &pinctrl_pwm1_d>;
> >>  };
> > 
> > It may make more sense to define these pwm nodes in the final board
> > level dts with only defining the pins that are actually used on the
> > board.
> 
> Well, if we follow that policy, we would have to remove almost anything
> from the -colibri.dtsi device trees...
> 
> The Colibri standard defines standard functionality, which is kept
> compatible across modules with different SoC's. However, on almost all
> pins different functionality is available, and we have some customer
> which make use that....
> 
> So far we followed the policy that we define the pin/device
> configuration of the standard functionality in the -colibri.dtsi files
> (since this is the most used functionality). This allows us to also
> "bug-fix" standard functionality without having to touch customers
> (often out-of-tree) device trees.
> 
> This change is not different from that approach, it merely splits the
> pin configuration in two individual pinctrl nodes. This makes sense for
> PWM signals since they can be used individually (compared to, lets say,
> I2C, where it is more like "all or nothing")...  It turned out that
> several customers used PWM<A> for the display back light, while using
> PWM<C> in a different function, therefor that change.

Okay, sounds reasonable.  But please be consistent on the naming.  I
would expect the pin groups named in scheme
pinctrl_<device><0,1,2...>_<a,b,c...>.  That said, in this case of pwm,
they should be something like below.

 - pinctrl_pwm0_a
 - pinctrl_pwm0_b
 - pinctrl_pwm1_a
 - pinctrl_pwm1_b

Shawn

  reply	other threads:[~2015-12-21 13:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 22:11 [PATCH 1/2] ARM: dts: vf-colibri: split PWM pinctrl Stefan Agner
2015-12-02 22:11 ` Stefan Agner
2015-12-02 22:11 ` [PATCH 2/2] ARM: dts: vf-colibri: add CAN support Stefan Agner
2015-12-02 22:11   ` Stefan Agner
2015-12-14  2:26   ` Shawn Guo
2015-12-14  2:26     ` Shawn Guo
2015-12-14  2:26     ` Shawn Guo
2015-12-14  2:18 ` [PATCH 1/2] ARM: dts: vf-colibri: split PWM pinctrl Shawn Guo
2015-12-14  2:18   ` Shawn Guo
2015-12-14  2:18   ` Shawn Guo
2015-12-14  2:53   ` Stefan Agner
2015-12-14  2:53     ` Stefan Agner
2015-12-14  2:53     ` Stefan Agner
2015-12-21 13:46     ` Shawn Guo [this message]
2015-12-21 13:46       ` Shawn Guo
2015-12-21 13:46       ` Shawn Guo

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=20151221134541.GD18410@tiger \
    --to=shawnguo@kernel.org \
    --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.