From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel A Fernandes Subject: Re: [PATCH 4/4] ARM: dts: AM33XX: Use pinctrl constants Date: Sun, 2 Jun 2013 12:43:23 -0500 Message-ID: References: <1370004142-30506-1-git-send-email-florian.vaussard@epfl.ch> <1370004142-30506-5-git-send-email-florian.vaussard@epfl.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8086943310113915085==" Return-path: In-Reply-To: <1370004142-30506-5-git-send-email-florian.vaussard-p8DiymsW2f8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Florian Vaussard Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Linux OMAP List , Linux ARM Kernel List List-Id: devicetree@vger.kernel.org --===============8086943310113915085== Content-Type: multipart/alternative; boundary=047d7b5d2c00723bf204de2f62de --047d7b5d2c00723bf204de2f62de Content-Type: text/plain; charset=ISO-8859-1 Hi Florian, This is very cool.. :-) On Fri, May 31, 2013 at 7:42 AM, Florian Vaussard wrote: > Using constants for pinctrl allows a better readability, and removes > redundancy with comments. > > Signed-off-by: Florian Vaussard > --- > arch/arm/boot/dts/am335x-bone.dts | 18 +++++++++--------- > arch/arm/boot/dts/am335x-evm.dts | 28 ++++++++++++++-------------- > arch/arm/boot/dts/am335x-evmsk.dts | 26 +++++++++++++------------- > arch/arm/boot/dts/am33xx.dtsi | 1 + > 4 files changed, 37 insertions(+), 36 deletions(-) > > diff --git a/arch/arm/boot/dts/am335x-bone.dts > b/arch/arm/boot/dts/am335x-bone.dts > index 5bfb7dd..61d0793 100644 > --- a/arch/arm/boot/dts/am335x-bone.dts > +++ b/arch/arm/boot/dts/am335x-bone.dts > @@ -30,30 +30,30 @@ > > user_leds_s0: user_leds_s0 { > pinctrl-single,pins = < > - 0x54 0x7 /* gpmc_a5.gpio1_21, > OUTPUT | MODE7 */ > - 0x58 0x17 /* gpmc_a6.gpio1_22, > OUTPUT_PULLUP | MODE7 */ > - 0x5c 0x7 /* gpmc_a7.gpio1_23, > OUTPUT | MODE7 */ > - 0x60 0x17 /* gpmc_a8.gpio1_24, > OUTPUT_PULLUP | MODE7 */ > + 0x54 (PIN_OUTPUT | MUX_MODE7) /* > gpmc_a5.gpio1_21 */ > + 0x58 (PIN_OUTPUT | PULL_UP | MUX_MODE7) /* > gpmc_a6.gpio1_22 */ > + 0x5c (PIN_OUTPUT | MUX_MODE7) /* > gpmc_a7.gpio1_23 */ > + 0x60 (PIN_OUTPUT | PULL_UP | MUX_MODE7) /* > gpmc_a8.gpio1_24 */ > > Does it make sense to also replace the pinmux offets with constants? Removal of the comment would mean looking at the DTS one still has to go back to the TRM to figure out what is the name for a particular offset. Thanks, Joel --047d7b5d2c00723bf204de2f62de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Florian,

This is very cool.. :-)
=

On Fri, May 31, 2= 013 at 7:42 AM, Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org><= /span> wrote:
Using constants for pinctrl allows a better readability, a= nd removes
redundancy with comments.

Signed-off-by: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
---
=A0arch/arm/boot/dts/am335x-bone.dts =A0| =A0 18 +++++++++---------
=A0arch/arm/boot/dts/am335x-evm.dts =A0 | =A0 28 ++++++++++++++------------= --
=A0arch/arm/boot/dts/am335x-evmsk.dts | =A0 26 +++++++++++++------------- =A0arch/arm/boot/dts/am33xx.dtsi =A0 =A0 =A0| =A0 =A01 +
=A04 files changed, 37 insertions(+), 36 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-b= one.dts
index 5bfb7dd..61d0793 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -30,30 +30,30 @@

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 user_leds_s0: user_leds_s0 {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pinctrl-single,pins =3D <= ;
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x54 0x7 =A0 = =A0 =A0 =A0/* gpmc_a5.gpio1_21, OUTPUT | MODE7 */
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x58 0x17 =A0= =A0 =A0 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x5c 0x7 =A0 = =A0 =A0 =A0/* gpmc_a7.gpio1_23, OUTPUT | MODE7 */
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x60 0x17 =A0= =A0 =A0 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x54 (PIN_OUT= PUT | MUX_MODE7) =A0 =A0 =A0 =A0 =A0 /* gpmc_a5.gpio1_21 */
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x58 (PIN_OUT= PUT | PULL_UP | MUX_MODE7) /* gpmc_a6.gpio1_22 */
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x5c (PIN_OUT= PUT | MUX_MODE7) =A0 =A0 =A0 =A0 =A0 /* gpmc_a7.gpio1_23 */
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x60 (PIN_OUT= PUT | PULL_UP | MUX_MODE7) /* gpmc_a8.gpio1_24 */

=
Does it make sense to also replace the pinmux offets w= ith constants?
Removal of the comment would mean looking at the DTS one still has to go ba= ck to the TRM to figure out what is the name for a particular offset.
=

Thanks,
Joel
--047d7b5d2c00723bf204de2f62de-- --===============8086943310113915085== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss --===============8086943310113915085==--