Skip to content

Commit fc7d3b6

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: renesas: Convert to use grp member
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 <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent a1cf1a5 commit fc7d3b6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

drivers/pinctrl/renesas/pinctrl-rza1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
11311131
return -EINVAL;
11321132

11331133
mux_confs = (struct rza1_mux_conf *)func->data;
1134-
for (i = 0; i < grp->num_pins; ++i) {
1134+
for (i = 0; i < grp->grp.npins; ++i) {
11351135
int ret;
11361136

11371137
ret = rza1_pin_mux_single(rza1_pctl, &mux_confs[i]);

drivers/pinctrl/renesas/pinctrl-rza2.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,15 @@ static int rza2_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
447447

448448
psel_val = func->data;
449449

450-
for (i = 0; i < grp->num_pins; ++i) {
450+
for (i = 0; i < grp->grp.npins; ++i) {
451451
dev_dbg(priv->dev, "Setting P%c_%d to PSEL=%d\n",
452-
port_names[RZA2_PIN_ID_TO_PORT(grp->pins[i])],
453-
RZA2_PIN_ID_TO_PIN(grp->pins[i]),
452+
port_names[RZA2_PIN_ID_TO_PORT(grp->grp.pins[i])],
453+
RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]),
454454
psel_val[i]);
455455
rza2_set_pin_function(
456456
priv->base,
457-
RZA2_PIN_ID_TO_PORT(grp->pins[i]),
458-
RZA2_PIN_ID_TO_PIN(grp->pins[i]),
457+
RZA2_PIN_ID_TO_PORT(grp->grp.pins[i]),
458+
RZA2_PIN_ID_TO_PIN(grp->grp.pins[i]),
459459
psel_val[i]);
460460
}
461461

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev,
283283
return -EINVAL;
284284

285285
psel_val = func->data;
286-
pins = group->pins;
286+
pins = group->grp.pins;
287287

288-
for (i = 0; i < group->num_pins; i++) {
288+
for (i = 0; i < group->grp.npins; i++) {
289289
unsigned int *pin_data = pctrl->desc.pins[pins[i]].drv_data;
290290
u32 off = RZG2L_PIN_CFG_TO_PORT_OFFSET(*pin_data);
291291
u32 pin = RZG2L_PIN_ID_TO_PIN(pins[i]);

drivers/pinctrl/renesas/pinctrl-rzv2m.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ static int rzv2m_pinctrl_set_mux(struct pinctrl_dev *pctldev,
175175
return -EINVAL;
176176

177177
psel_val = func->data;
178-
pins = group->pins;
178+
pins = group->grp.pins;
179179

180-
for (i = 0; i < group->num_pins; i++) {
180+
for (i = 0; i < group->grp.npins; i++) {
181181
dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n",
182182
RZV2M_PIN_ID_TO_PORT(pins[i]), RZV2M_PIN_ID_TO_PIN(pins[i]),
183183
psel_val[i]);

0 commit comments

Comments
 (0)