linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org
Cc: robin.murphy@arm.com, briannorris@chromium.org,
	dianders@chromium.org, Emil Renner Berthing <esmil@mailme.dk>,
	ezequiel@collabora.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: dts: rockchip: bulk convert gpios to their constant counterparts
Date: Thu, 11 Apr 2019 14:40:24 +0200	[thread overview]
Message-ID: <1667071.gWk23hUjN5@phil> (raw)
In-Reply-To: <20190402121852.14442-1-heiko@sntech.de>

Am Dienstag, 2. April 2019, 14:18:51 CEST schrieb Heiko Stuebner:
> Rockchip SoCs use 2 different numbering schemes. Where the gpio-
> controllers just count 0-31 for their 32 gpios, the underlying
> iomux controller splits these into 4 separate entities A-D.
> 
> Device-schematics always use these iomux-values to identify pins,
> so to make mapping schematics to devicetree easier Andy Yan introduced
> named constants for the pins but so far we only used them on new
> additions.
> 
> Using a sed-script created by Emil Renner Berthing bulk-convert
> the remaining raw gpio numbers into their descriptive counterparts
> and also gets rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x
> mappings:
> 
> /rockchip,pins *=/bcheck
> b # to end of script
> :append-next-line
> N
> :check
> /^[^;]*$/bappend-next-line
> s/<RK_GPIO\([0-9]\) /<\1 /g
> s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
> s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
> s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
> s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
> s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
> s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
> s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
> s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
> s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
> s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
> s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
> s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
> s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
> s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
> s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
> s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
> s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
> s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
> s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
> s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
> s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
> s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
> s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
> s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
> s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
> s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
> s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
> s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
> s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
> s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
> s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
> s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
> s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
> s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g
> 
> Suggested-by: Emil Renner Berthing <esmil@mailme.dk>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

applied both patches for 5.2



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2019-04-11 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190402121852.14442-1-heiko@sntech.de>
2019-04-02 12:18 ` [PATCH 2/2] arm64: dts: rockchip: bulk convert gpios to their constant counterparts Heiko Stuebner
2019-04-06 15:56   ` Katsuhiro Suzuki
2019-04-08 12:03   ` Robin Murphy
2019-04-11 12:40 ` Heiko Stuebner [this message]

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=1667071.gWk23hUjN5@phil \
    --to=heiko@sntech.de \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=esmil@mailme.dk \
    --cc=ezequiel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robin.murphy@arm.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).