pinctrl: qcom: Refactor generic qcom pinctrl driver
authorRohit Agarwal <quic_rohiagar@quicinc.com>
Mon, 15 May 2023 06:46:10 +0000 (12:16 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 16 May 2023 13:03:37 +0000 (15:03 +0200)
Reuse the generic pingroup struct from pinctrl.h in msm_pingroup
along with the macro defined.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1684133170-18540-3-git-send-email-quic_rohiagar@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
47 files changed:
drivers/pinctrl/qcom/pinctrl-apq8064.c
drivers/pinctrl/qcom/pinctrl-apq8084.c
drivers/pinctrl/qcom/pinctrl-ipq4019.c
drivers/pinctrl/qcom/pinctrl-ipq5332.c
drivers/pinctrl/qcom/pinctrl-ipq6018.c
drivers/pinctrl/qcom/pinctrl-ipq8064.c
drivers/pinctrl/qcom/pinctrl-ipq8074.c
drivers/pinctrl/qcom/pinctrl-ipq9574.c
drivers/pinctrl/qcom/pinctrl-mdm9607.c
drivers/pinctrl/qcom/pinctrl-mdm9615.c
drivers/pinctrl/qcom/pinctrl-msm.c
drivers/pinctrl/qcom/pinctrl-msm.h
drivers/pinctrl/qcom/pinctrl-msm8226.c
drivers/pinctrl/qcom/pinctrl-msm8660.c
drivers/pinctrl/qcom/pinctrl-msm8909.c
drivers/pinctrl/qcom/pinctrl-msm8916.c
drivers/pinctrl/qcom/pinctrl-msm8953.c
drivers/pinctrl/qcom/pinctrl-msm8960.c
drivers/pinctrl/qcom/pinctrl-msm8976.c
drivers/pinctrl/qcom/pinctrl-msm8994.c
drivers/pinctrl/qcom/pinctrl-msm8996.c
drivers/pinctrl/qcom/pinctrl-msm8998.c
drivers/pinctrl/qcom/pinctrl-msm8x74.c
drivers/pinctrl/qcom/pinctrl-qcm2290.c
drivers/pinctrl/qcom/pinctrl-qcs404.c
drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
drivers/pinctrl/qcom/pinctrl-qdu1000.c
drivers/pinctrl/qcom/pinctrl-sa8775p.c
drivers/pinctrl/qcom/pinctrl-sc7180.c
drivers/pinctrl/qcom/pinctrl-sc7280.c
drivers/pinctrl/qcom/pinctrl-sc8180x.c
drivers/pinctrl/qcom/pinctrl-sc8280xp.c
drivers/pinctrl/qcom/pinctrl-sdm660.c
drivers/pinctrl/qcom/pinctrl-sdm670.c
drivers/pinctrl/qcom/pinctrl-sdm845.c
drivers/pinctrl/qcom/pinctrl-sdx55.c
drivers/pinctrl/qcom/pinctrl-sdx65.c
drivers/pinctrl/qcom/pinctrl-sm6115.c
drivers/pinctrl/qcom/pinctrl-sm6125.c
drivers/pinctrl/qcom/pinctrl-sm6350.c
drivers/pinctrl/qcom/pinctrl-sm6375.c
drivers/pinctrl/qcom/pinctrl-sm7150.c
drivers/pinctrl/qcom/pinctrl-sm8150.c
drivers/pinctrl/qcom/pinctrl-sm8250.c
drivers/pinctrl/qcom/pinctrl-sm8350.c
drivers/pinctrl/qcom/pinctrl-sm8450.c
drivers/pinctrl/qcom/pinctrl-sm8550.c

index 57b9a4a08e11571e6da65ca1bb5401fed3e94f09..20c3b9025044515477f39bc25f0202dcca561743 100644 (file)
@@ -210,9 +210,9 @@ static const unsigned int sdc3_data_pins[] = { 95 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        APQ_MUX_gpio,                   \
                        APQ_MUX_##f1,                   \
@@ -251,9 +251,9 @@ static const unsigned int sdc3_data_pins[] = { 95 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 7a9b6e9feb1c14bbd5e3db26570caa2cf1998475..3fc0a40762b631ad3dc15c9a7624ab705f367e74 100644 (file)
@@ -325,9 +325,9 @@ static const unsigned int sdc2_data_pins[] = { 152 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        APQ_MUX_gpio,                   \
                        APQ_MUX_##f1,                   \
@@ -363,9 +363,9 @@ static const unsigned int sdc2_data_pins[] = { 152 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 3ab859be6fbea98ab49ca8fb5233a1b7e33b2a50..1f7944dd829d1b9cb8c445ee075e0e29a12294b9 100644 (file)
@@ -217,9 +217,9 @@ DECLARE_QCA_GPIO_PINS(99);
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned)ARRAY_SIZE(gpio##id##_pins), \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        qca_mux_gpio, /* gpio mode */   \
                        qca_mux_##f1,                   \
index bc90c68abe74607202547650d228224e70acf24c..625f8014051f6acf8e6f91d48d0406b8c2bd8caf 100644 (file)
@@ -12,9 +12,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
index 1e1255c09d7a28626336eeffd2a4dcd39f9307c2..0ad08647dbcdf0b1fa21a618310f150a1bde2fae 100644 (file)
@@ -12,9 +12,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
index 54cca3241cb86c36d6fb0600e6d73e4fcd839f4b..e2bb94e86aef6e0055860794a1c64649c722aebc 100644 (file)
@@ -162,9 +162,9 @@ static const unsigned int sdc3_data_pins[] = { 71 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        IPQ_MUX_gpio,                   \
                        IPQ_MUX_##f1,                   \
@@ -203,9 +203,9 @@ static const unsigned int sdc3_data_pins[] = { 71 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 0d325aa3508e32f4e2dde9f1ce37910a08a80f6d..337f3a1c92c19285f16f59a79f3e2b20561ae19a 100644 (file)
@@ -12,9 +12,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
index 59a8b52943fb8362d80f624352ecca9e3519c9ee..e2491617b2364a64169297426351e723c37f030c 100644 (file)
@@ -12,9 +12,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
index 331d4c1b9baa0536484e4be61b8b3c60701a5e33..e7cd3ef1cf3e815ae25aa9e0c6872fbbd2c8ac79 100644 (file)
@@ -205,9 +205,9 @@ static const unsigned int qdsd_data3_pins[] = { 91 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                                       \
-               .name = "gpio" #id,                             \
-               .pins = gpio##id##_pins,                        \
-               .npins = ARRAY_SIZE(gpio##id##_pins),           \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                               \
                        msm_mux_gpio,                           \
                        msm_mux_##f1,                           \
@@ -244,9 +244,9 @@ static const unsigned int qdsd_data3_pins[] = { 91 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 7278f45318b1ef0d6c3a3e15306e8df002b2f4da..0a2ae383d3d57bd4101efb7a2093b68b8920b426 100644 (file)
@@ -196,9 +196,9 @@ DECLARE_MSM_GPIO_PINS(87);
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
index 94b984a0ae1389294ab9fd29fcc8c5ccfef6a79d..2585ef2b2793505342905ff44cebc2f07a9d28fb 100644 (file)
@@ -120,7 +120,7 @@ static const char *msm_get_group_name(struct pinctrl_dev *pctldev,
 {
        struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-       return pctrl->soc->groups[group].name;
+       return pctrl->soc->groups[group].grp.name;
 }
 
 static int msm_get_group_pins(struct pinctrl_dev *pctldev,
@@ -130,8 +130,8 @@ static int msm_get_group_pins(struct pinctrl_dev *pctldev,
 {
        struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-       *pins = pctrl->soc->groups[group].pins;
-       *num_pins = pctrl->soc->groups[group].npins;
+       *pins = pctrl->soc->groups[group].grp.pins;
+       *num_pins = pctrl->soc->groups[group].grp.npins;
        return 0;
 }
 
@@ -705,11 +705,11 @@ static void msm_gpio_dbg_show_one(struct seq_file *s,
                val = !!(io_reg & BIT(g->in_bit));
 
        if (egpio_enable) {
-               seq_printf(s, " %-8s: egpio\n", g->name);
+               seq_printf(s, " %-8s: egpio\n", g->grp.name);
                return;
        }
 
-       seq_printf(s, " %-8s: %-3s", g->name, is_out ? "out" : "in");
+       seq_printf(s, " %-8s: %-3s", g->grp.name, is_out ? "out" : "in");
        seq_printf(s, " %-4s func%d", val ? "high" : "low", func);
        seq_printf(s, " %dmA", msm_regval_to_drive(drive));
        if (pctrl->soc->pull_no_keeper)
index b9363e275e0d088dc14aed15aed4d97de0c63f90..5e4410bed8237dc029c3ac9986a9a5ceb12a0d4b 100644 (file)
@@ -36,9 +36,7 @@ struct pinctrl_pin_desc;
 
 /**
  * struct msm_pingroup - Qualcomm pingroup definition
- * @name:                 Name of the pingroup.
- * @pins:                A list of pins assigned to this pingroup.
- * @npins:               Number of entries in @pins.
+ * @grp:                  Generic data of the pin group (name and pins)
  * @funcs:                A list of pinmux functions that can be selected for
  *                        this group. The index of the selected function is used
  *                        for programming the function selector.
@@ -71,9 +69,7 @@ struct pinctrl_pin_desc;
  *                        otherwise 1.
  */
 struct msm_pingroup {
-       const char *name;
-       const unsigned *pins;
-       unsigned npins;
+       struct pingroup grp;
 
        unsigned *funcs;
        unsigned nfuncs;
index cb8044bd68f567e70bc2a64d4437f521243d81ee..994619840a706c810c340e55371849f6159f46c7 100644 (file)
@@ -264,9 +264,9 @@ static const unsigned int sdc2_data_pins[] = { 122 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -301,9 +301,9 @@ static const unsigned int sdc2_data_pins[] = { 122 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 114c5b4ceded3a37e9d1c2e976fde2366f3ee449..999a5f867eb5081232443a893773d73c8dc65d1b 100644 (file)
@@ -376,9 +376,9 @@ static const unsigned int sdc3_data_pins[] = { 178 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -414,9 +414,9 @@ static const unsigned int sdc3_data_pins[] = { 178 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index fdf262f851bd7b07fa24bb74e87bd850d6a7d776..756856d20d6b5f2d4e764ff32f2493de24ca677c 100644 (file)
@@ -13,9 +13,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index d3776a5fb9590070c2ea1936007cb66b7c6191e4..cea5c54f92fec1829c5378a8441eb8710fd500f0 100644 (file)
@@ -287,9 +287,9 @@ static const unsigned int qdsd_data3_pins[] = { 133 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                                       \
-               .name = "gpio" #id,                             \
-               .pins = gpio##id##_pins,                        \
-               .npins = ARRAY_SIZE(gpio##id##_pins),           \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                               \
                        msm_mux_gpio,                           \
                        msm_mux_##f1,                           \
@@ -326,9 +326,9 @@ static const unsigned int qdsd_data3_pins[] = { 133 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 8969bb528b9dff0d1c0e133b544f9b11f958ba99..998351bdfee1369fe0f369648d66a1a05493c8fb 100644 (file)
@@ -9,9 +9,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                                       \
-               .name = "gpio" #id,                             \
-               .pins = gpio##id##_pins,                        \
-               .npins = ARRAY_SIZE(gpio##id##_pins),           \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                               \
                        msm_mux_gpio, /* gpio mode */           \
                        msm_mux_##f1,                           \
@@ -48,9 +48,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 615614ef1902ee3d9c1614f0953fe5a2eec1341f..ebe230b3b437ccc63535fdf51639e64a67fe05eb 100644 (file)
@@ -335,9 +335,9 @@ static const unsigned int sdc3_data_pins[] = { 157 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -377,9 +377,9 @@ static const unsigned int sdc3_data_pins[] = { 157 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index b2cad1d44b9bc0a179920695fee20f51ec3f4422..c30d80e4e98ca68ccede66001445967a47d6ec8f 100644 (file)
@@ -15,9 +15,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -54,9 +54,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 73b2901a29c654cdb1a2e5d436d6a72e6e0ddf1a..b1a6759ab4a5e70501aba4325e80db2359251204 100644 (file)
@@ -11,9 +11,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11)     \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 9437305f8d968fc64ffb3aa224787538a6e5e048..46cc0b49dbab52bdff9012715ef7776edfe6b908 100644 (file)
@@ -13,9 +13,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned)ARRAY_SIZE(gpio##id##_pins), \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned)ARRAY_SIZE(pg_name##_pins),  \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 4c1a551f5bb2e9ed07c47472b89149d16d245414..b7cbf32b3125a91081c6644cd3d343e08499dd1f 100644 (file)
@@ -15,9 +15,9 @@
 
 #define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -54,9 +54,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -79,9 +79,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 5da17f211601e2071643e17b63760770d54d5ccd..d5fe62992849c994bb958f19dffe0dff4da7995e 100644 (file)
@@ -326,9 +326,9 @@ static const unsigned int hsic_data_pins[] = { 153 };
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_##f1,                   \
@@ -363,9 +363,9 @@ static const unsigned int hsic_data_pins[] = { 153 };
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)          \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -389,9 +389,9 @@ static const unsigned int hsic_data_pins[] = { 153 };
 
 #define HSIC_PINGROUP(pg_name, ctl)                    \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .funcs = (int[]){                       \
                        msm_mux_gpio,                   \
                        msm_mux_hsic_ctl,               \
index e252e6cee75c52f16e017fd7d46058ef9b1f08b2..ba699eac9ee8b2cb2172f3591a32709518eeb92e 100644 (file)
@@ -13,9 +13,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -77,9 +77,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 3820808edbf9ea87866936c9dde677ae3ae6a286..ae7224012f8aa00a41350b3ce670511aa8ce18bd 100644 (file)
@@ -23,9 +23,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -63,9 +63,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index 43bd15f16377d5717dba03afa5009f41cfc85b70..b0f1b3dc6831ac5463874ec788bbefe8cde87081 100644 (file)
@@ -90,17 +90,17 @@ static int qdf2xxx_pinctrl_probe(struct platform_device *pdev)
         */
        for (i = 0; i < num_gpios; i++) {
                pins[i].number = i;
-               groups[i].pins = &pins[i].number;
+               groups[i].grp.pins = &pins[i].number;
        }
 
        /* Populate the entries that are meant to be exposed as GPIOs. */
        for (i = 0; i < avail_gpios; i++) {
                unsigned int gpio = gpios[i];
 
-               groups[gpio].npins = 1;
+               groups[gpio].grp.npins = 1;
                snprintf(names[i], NAME_SIZE, "gpio%u", gpio);
                pins[gpio].name = names[i];
-               groups[gpio].name = names[i];
+               groups[gpio].grp.name = names[i];
 
                groups[gpio].ctl_reg = 0x10000 * gpio;
                groups[gpio].io_reg = 0x04 + 0x10000 * gpio;
index d4670fe196258fadd30a27447d7af6c689f16a09..47bc529ef550d2ab9a13341295eacc08faed24c4 100644 (file)
@@ -15,9 +15,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -54,9 +54,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = REG_BASE + ctl,                              \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -79,9 +79,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index b0bf65c73f4040b21f0e3aaf0c74aea47bef16d1..81dd213b3c7afdb7bc5e67548b54e778a2c3ef39 100644 (file)
@@ -14,9 +14,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)\
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -55,9 +55,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -80,9 +80,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 1bdd5eacc371873ae334f00d8fe7566e0bfd8161..6eb0c73791c0bc9883bf0b740b8930fe7c7fced0 100644 (file)
@@ -21,9 +21,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -61,9 +61,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -87,9 +87,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index bb98afad06864c8a5bab0c366b8ee715cf8165c3..0c10eeb60b55e742a73dfd43d647f7009471b1b0 100644 (file)
@@ -11,9 +11,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -77,9 +77,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 9b2876b0ebaad7e74be4eea6ddde53f3a653df2d..f86b176ed0b7e591cd083e11c4d9b68fcbfb5432 100644 (file)
@@ -40,9 +40,9 @@ static const struct tile_info sc8180x_tile_info[] = {
 #define REG_SIZE 0x1000
 #define PINGROUP_OFFSET(id, _tile, offset, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -83,9 +83,9 @@ static const struct tile_info sc8180x_tile_info[] = {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -109,9 +109,9 @@ static const struct tile_info sc8180x_tile_info[] = {
 
 #define UFS_RESET(pg_name)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = 0xb6000,                     \
                .io_reg = 0xb6004,                      \
                .intr_cfg_reg = 0,                      \
index 1ad1b2c446ae581ce73c140c4db4bec2a303e704..96f4fb5a5d297f784e63f4335e294ebdee5f487f 100644 (file)
@@ -13,9 +13,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -77,9 +77,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 863c8b1d74186236d4eef98499fa064428eb0dd6..c2e0d5c034acf6af28fe267175c705ae25391672 100644 (file)
@@ -26,9 +26,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned)ARRAY_SIZE(gpio##id##_pins), \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -66,9 +66,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned)ARRAY_SIZE(pg_name##_pins),  \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index e630460ff5a435582578e357200cc776076e85a4..cc3cce077de4e61934a114c263ebd1fd96432dfb 100644 (file)
@@ -17,9 +17,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -60,9 +60,9 @@
  */
 #define PINGROUP_DUMMY(id)                             \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .ctl_reg = 0,                           \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -85,9 +85,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index f8cd74de5736ececcec6245354388132f5102b21..cc05c415ed15512f1f99a598650d3adfdc795a6d 100644 (file)
@@ -16,9 +16,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10)    \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -56,9 +56,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -81,9 +81,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 64957e117c15c4b85221d5bfa8820db6ffdc972e..8826db9d21d04cecca844b0607984e21a500f15b 100644 (file)
@@ -13,9 +13,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
index d94de5b677bd905697ba1b68f2e053c758a69ab1..f6f319c997fc7a39d672872c0df1fa2ea821b2d9 100644 (file)
@@ -13,9 +13,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -77,9 +77,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 73408ebdc1a18053e498ec35fec9b4ac3201daac..2a06025f48858426c9bb5a9bd2d7eba279a98d46 100644 (file)
@@ -23,9 +23,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -63,9 +63,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, _tile, ctl, pull, drv)      \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -89,9 +89,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index f94d6dac4031ed1cdec80c90134d490dd2fe5fa2..d5e2b896954c220c13da2835aa32f5e288903205 100644 (file)
@@ -20,9 +20,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -60,9 +60,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, _tile, ctl, pull, drv)      \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -86,9 +86,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 0193917554b71a72b60cd6d925faadf82c7ad098..f3828c07b134500e4307db1d42aabae389a03360 100644 (file)
@@ -13,9 +13,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -52,9 +52,9 @@
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -77,9 +77,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 778f56e612d3f2230bde895796783388891e2cb2..c82c8516932ea2e1880284fa86bdaf3683f024cc 100644 (file)
@@ -14,9 +14,9 @@
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -55,9 +55,9 @@
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -80,9 +80,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 544c146c404ceb78a74dc33d39e4eefcba7cdf30..33657cf98fb9d571de8031100e6fad17c6807504 100644 (file)
@@ -27,9 +27,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = ARRAY_SIZE(gpio##id##_pins),   \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -67,9 +67,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -93,9 +93,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = ARRAY_SIZE(pg_name##_pins),    \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index c7df131acb9f981e8e6d09e5392f217459fdf6e4..01aea9c70b7a78168ee063f5ac88afc0d7290bcb 100644 (file)
@@ -23,9 +23,9 @@ enum {
 
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)        \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -63,9 +63,9 @@ enum {
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -89,9 +89,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 2d18588c1a3d213c7ae14167087e3c8d76c92313..e9961a49ff9811bfa3ed3c6c1a8f1cf90afa1d29 100644 (file)
@@ -24,9 +24,9 @@ enum {
 #define REG_SIZE 0x1000
 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -64,9 +64,9 @@ enum {
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -90,9 +90,9 @@ enum {
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 6c402a17a34564038be330e8c2028435b46a2218..9c69458bd9109119e7a88d1a92f633bbf188ed0c 100644 (file)
@@ -14,9 +14,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -53,9 +53,9 @@
 
 #define SDC_PINGROUP(pg_name, ctl, pull, drv)  \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -78,9 +78,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index 5dcebea64863d7f2eec3e70b096c22bb72503eda..d11bb1ee9e3d8dfbb1e810051d5c854a959b428b 100644 (file)
@@ -14,9 +14,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -55,9 +55,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -80,9 +80,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \
index d69e7029e9a500edd4684823fc004ff5cfbb89c0..3c847d9cb5d93bbc7bb5a9b0b2ee707e14de6387 100644 (file)
@@ -15,9 +15,9 @@
 
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)       \
        {                                               \
-               .name = "gpio" #id,                     \
-               .pins = gpio##id##_pins,                \
-               .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins),     \
+               .grp = PINCTRL_PINGROUP("gpio" #id,     \
+                       gpio##id##_pins,                \
+                       ARRAY_SIZE(gpio##id##_pins)),   \
                .funcs = (int[]){                       \
                        msm_mux_gpio, /* gpio mode */   \
                        msm_mux_##f1,                   \
@@ -57,9 +57,9 @@
 
 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)     \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = ctl,                         \
                .io_reg = 0,                            \
                .intr_cfg_reg = 0,                      \
@@ -82,9 +82,9 @@
 
 #define UFS_RESET(pg_name, offset)                             \
        {                                               \
-               .name = #pg_name,                       \
-               .pins = pg_name##_pins,                 \
-               .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins),      \
+               .grp = PINCTRL_PINGROUP(#pg_name,       \
+                       pg_name##_pins,                 \
+                       ARRAY_SIZE(pg_name##_pins)),    \
                .ctl_reg = offset,                      \
                .io_reg = offset + 0x4,                 \
                .intr_cfg_reg = 0,                      \