pinctrl: renesas: Convert to use grp member
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 11 Dec 2023 18:58:04 +0000 (20:58 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 11 Dec 2023 23:47:52 +0000 (00:47 +0100)
Convert drivers to use grp member embedded in struct group_desc,
because other members will be removed to avoid duplication and
desynchronisation of the generic pin group description.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231211190321.307330-12-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/renesas/pinctrl-rza1.c
drivers/pinctrl/renesas/pinctrl-rza2.c
drivers/pinctrl/renesas/pinctrl-rzg2l.c
drivers/pinctrl/renesas/pinctrl-rzv2m.c

index f43f1196fea861f3504fb3eff7888099eac4018b..edcbe7c9ad565e858955fac8b5dd2d78faa445d1 100644 (file)
@@ -1131,7 +1131,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
                return -EINVAL;
 
        mux_confs = (struct rza1_mux_conf *)func->data;
-       for (i = 0; i < grp->num_pins; ++i) {
+       for (i = 0; i < grp->grp.npins; ++i) {
                int ret;
 
                ret = rza1_pin_mux_single(rza1_pctl, &mux_confs[i]);
index 990b96d459671bc7824f90dd1a787e6aa4d2fced..af689d7c117f35482487a0e2fa1f5bc45e5fa262 100644 (file)
@@ -447,15 +447,15 @@ static int rza2_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
 
        psel_val = func->data;
 
-       for (i = 0; i < grp->num_pins; ++i) {
+       for (i = 0; i < grp->grp.npins; ++i) {
                dev_dbg(priv->dev, "Setting P%c_%d to PSEL=%d\n",
-                       port_names[RZA2_PIN_ID_TO_PORT(grp->pins[i])],
-                       RZA2_PIN_ID_TO_PIN(grp->pins[i]),
+                       port_names[RZA2_PIN_ID_TO_PORT(grp->grp.pins[i])],
+                       RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]),
                        psel_val[i]);
                rza2_set_pin_function(
                        priv->base,
-                       RZA2_PIN_ID_TO_PORT(grp->pins[i]),
-                       RZA2_PIN_ID_TO_PIN(grp->pins[i]),
+                       RZA2_PIN_ID_TO_PORT(grp->grp.pins[i]),
+                       RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]),
                        psel_val[i]);
        }
 
index 68fcc2a4efbc79c4bd1279587087e3a3f29fb81c..f01aa51b00c4ee7fbb15285bccc43c9b1a829ef2 100644 (file)
@@ -283,9 +283,9 @@ static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev,
                return -EINVAL;
 
        psel_val = func->data;
-       pins = group->pins;
+       pins = group->grp.pins;
 
-       for (i = 0; i < group->num_pins; i++) {
+       for (i = 0; i < group->grp.npins; i++) {
                unsigned int *pin_data = pctrl->desc.pins[pins[i]].drv_data;
                u32 off = RZG2L_PIN_CFG_TO_PORT_OFFSET(*pin_data);
                u32 pin = RZG2L_PIN_ID_TO_PIN(pins[i]);
index eb304fab17968915f270dc214073018f2c38739a..0767a5ac23e08027e4335f14cdff48f505fb8db4 100644 (file)
@@ -175,9 +175,9 @@ static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev,
                return -EINVAL;
 
        psel_val = func->data;
-       pins = group->pins;
+       pins = group->grp.pins;
 
-       for (i = 0; i < group->num_pins; i++) {
+       for (i = 0; i < group->grp.npins; i++) {
                dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n",
                        RZV2M_PIN_ID_TO_PORT(pins[i]), RZV2M_PIN_ID_TO_PIN(pins[i]),
                        psel_val[i]);