From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linus.walleij@linaro.org, linux-sh@vger.kernel.org,
laurent.pinchart@ideasonboard.com, linux-gpio@vger.kernel.org
Subject: [PATCH] pinctrl: sh-pfc: r8a779[01]: move 'union vin_data' to shared header file
Date: Fri, 28 Aug 2015 23:39:36 +0300 [thread overview]
Message-ID: <4177542.1tOnYXlTVP@wasted.cogentembedded.com> (raw)
In-Reply-To: <13219129.kD4pZSmcAP@wasted.cogentembedded.com>
R8A7790/1 PFC drivers use almost identical 'union vin_data' and completely
identical VIN_DATA_PIN_GROUP() macro; we thus can move them into the shared
header file...
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git' repo.
drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 18 ------------------
drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 18 ------------------
drivers/pinctrl/sh-pfc/sh_pfc.h | 18 ++++++++++++++++++
3 files changed, 18 insertions(+), 36 deletions(-)
Index: linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
===================================================================
--- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
+++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
@@ -3625,24 +3625,6 @@ static const unsigned int usb2_mux[] = {
USB2_PWEN_MARK, USB2_OVC_MARK,
};
-union vin_data {
- unsigned int data24[24];
- unsigned int data20[20];
- unsigned int data16[16];
- unsigned int data12[12];
- unsigned int data10[10];
- unsigned int data8[8];
- unsigned int data4[4];
-};
-
-#define VIN_DATA_PIN_GROUP(n, s) \
- { \
- .name = #n#s, \
- .pins = n##_pins.data##s, \
- .mux = n##_mux.data##s, \
- .nr_pins = ARRAY_SIZE(n##_pins.data##s), \
- }
-
/* - VIN0 ------------------------------------------------------------------- */
static const union vin_data vin0_data_pins = {
.data24 = {
Index: linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
===================================================================
--- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -3986,24 +3986,6 @@ static const unsigned int usb1_mux[] = {
USB1_PWEN_MARK,
USB1_OVC_MARK,
};
-
-union vin_data {
- unsigned int data24[24];
- unsigned int data20[20];
- unsigned int data16[16];
- unsigned int data12[12];
- unsigned int data10[10];
- unsigned int data8[8];
-};
-
-#define VIN_DATA_PIN_GROUP(n, s) \
- { \
- .name = #n#s, \
- .pins = n##_pins.data##s, \
- .mux = n##_mux.data##s, \
- .nr_pins = ARRAY_SIZE(n##_pins.data##s), \
- }
-
/* - VIN0 ------------------------------------------------------------------- */
static const union vin_data vin0_data_pins = {
.data24 = {
Index: linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
===================================================================
--- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -52,6 +52,24 @@ struct sh_pfc_pin_group {
unsigned int nr_pins;
};
+#define VIN_DATA_PIN_GROUP(n, s) \
+ { \
+ .name = #n#s, \
+ .pins = n##_pins.data##s, \
+ .mux = n##_mux.data##s, \
+ .nr_pins = ARRAY_SIZE(n##_pins.data##s), \
+ }
+
+union vin_data {
+ unsigned int data24[24];
+ unsigned int data20[20];
+ unsigned int data16[16];
+ unsigned int data12[12];
+ unsigned int data10[10];
+ unsigned int data8[8];
+ unsigned int data4[4];
+};
+
#define SH_PFC_FUNCTION(n) \
{ \
.name = #n, \
next prev parent reply other threads:[~2015-08-28 20:39 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 22:25 [PATCH 0/2] Add Renesas R8A7794 USB/VIN PFC support Sergei Shtylyov
2015-08-18 22:26 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7794: add USB pin groups Sergei Shtylyov
2015-08-19 21:14 ` Laurent Pinchart
2015-08-20 12:59 ` Sergei Shtylyov
2015-08-20 19:44 ` Laurent Pinchart
2015-08-20 19:48 ` Sergei Shtylyov
2015-08-26 11:41 ` Linus Walleij
2015-08-18 22:29 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7794: add VIN " Sergei Shtylyov
2015-08-25 12:30 ` Geert Uytterhoeven
2015-08-26 22:20 ` Sergei Shtylyov
2015-08-28 20:39 ` Sergei Shtylyov [this message]
2015-09-21 11:45 ` [PATCH] pinctrl: sh-pfc: r8a779[01]: move 'union vin_data' to shared header file Geert Uytterhoeven
2015-08-28 20:46 ` [PATCH v2] pinctrl: sh-pfc: r8a7794: add VIN pin groups Sergei Shtylyov
2015-09-21 12:03 ` Geert Uytterhoeven
2015-10-02 7:59 ` Geert Uytterhoeven
2015-10-02 11:12 ` Sergei Shtylyov
2015-09-21 21:59 ` [PATCH v3] " Sergei Shtylyov
2015-09-21 22:02 ` Sergei Shtylyov
2015-09-21 22:00 ` Sergei Shtylyov
2015-09-22 7:32 ` Geert Uytterhoeven
2015-09-22 22:06 ` [PATCH v2] pinctrl: sh-pfc: r8a779[01]: move 'union vin_data' to shared header file Sergei Shtylyov
2015-10-01 16:20 ` Laurent Pinchart
2015-10-02 23:21 ` [PATCH v3] " Sergei Shtylyov
2015-10-02 23:21 ` [PATCH v4] pinctrl: sh-pfc: r8a7794: add VIN pin groups Sergei Shtylyov
2015-12-02 20:11 ` [PATCH] pinctrl: sh-pfc: r8a7791: add EtherAVB " Sergei Shtylyov
2015-12-08 12:12 ` Geert Uytterhoeven
2015-12-08 12:30 ` Sergei Shtylyov
2015-12-08 13:06 ` Geert Uytterhoeven
2015-12-08 13:41 ` Sergei Shtylyov
2015-12-08 13:50 ` Geert Uytterhoeven
2015-12-14 22:06 ` [PATCH v2] " Sergei Shtylyov
2015-12-16 10:27 ` Geert Uytterhoeven
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=4177542.1tOnYXlTVP@wasted.cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sh@vger.kernel.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 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).