1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 01:09:38 -05:00

pinctrl: starfive: 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: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231211190321.307330-13-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Andy Shevchenko 2023-12-11 20:58:05 +02:00 committed by Linus Walleij
parent fc7d3b60a8
commit fcbcfe5cb7
2 changed files with 8 additions and 8 deletions

View file

@ -654,7 +654,7 @@ static int starfive_set_mux(struct pinctrl_dev *pctldev,
return -EINVAL; return -EINVAL;
pinmux = group->data; pinmux = group->data;
for (i = 0; i < group->num_pins; i++) { for (i = 0; i < group->grp.npins; i++) {
u32 v = pinmux[i]; u32 v = pinmux[i];
unsigned int gpio = starfive_pinmux_to_gpio(v); unsigned int gpio = starfive_pinmux_to_gpio(v);
u32 dout = starfive_pinmux_to_dout(v); u32 dout = starfive_pinmux_to_dout(v);
@ -797,7 +797,7 @@ static int starfive_pinconf_group_get(struct pinctrl_dev *pctldev,
if (!group) if (!group)
return -EINVAL; return -EINVAL;
return starfive_pinconf_get(pctldev, group->pins[0], config); return starfive_pinconf_get(pctldev, group->grp.pins[0], config);
} }
static int starfive_pinconf_group_set(struct pinctrl_dev *pctldev, static int starfive_pinconf_group_set(struct pinctrl_dev *pctldev,
@ -876,8 +876,8 @@ static int starfive_pinconf_group_set(struct pinctrl_dev *pctldev,
} }
} }
for (i = 0; i < group->num_pins; i++) for (i = 0; i < group->grp.npins; i++)
starfive_padctl_rmw(sfp, group->pins[i], mask, value); starfive_padctl_rmw(sfp, group->grp.pins[i], mask, value);
return 0; return 0;
} }

View file

@ -307,7 +307,7 @@ static int jh7110_set_mux(struct pinctrl_dev *pctldev,
return -EINVAL; return -EINVAL;
pinmux = group->data; pinmux = group->data;
for (i = 0; i < group->num_pins; i++) { for (i = 0; i < group->grp.npins; i++) {
u32 v = pinmux[i]; u32 v = pinmux[i];
if (info->jh7110_set_one_pin_mux) if (info->jh7110_set_one_pin_mux)
@ -437,7 +437,7 @@ static int jh7110_pinconf_group_get(struct pinctrl_dev *pctldev,
if (!group) if (!group)
return -EINVAL; return -EINVAL;
return jh7110_pinconf_get(pctldev, group->pins[0], config); return jh7110_pinconf_get(pctldev, group->grp.pins[0], config);
} }
static int jh7110_pinconf_group_set(struct pinctrl_dev *pctldev, static int jh7110_pinconf_group_set(struct pinctrl_dev *pctldev,
@ -508,8 +508,8 @@ static int jh7110_pinconf_group_set(struct pinctrl_dev *pctldev,
} }
} }
for (i = 0; i < group->num_pins; i++) for (i = 0; i < group->grp.npins; i++)
jh7110_padcfg_rmw(sfp, group->pins[i], mask, value); jh7110_padcfg_rmw(sfp, group->grp.pins[i], mask, value);
return 0; return 0;
} }