[PATCH v5 00/13] pinctrl: Convert struct group_desc to use struct pingroup

Andy Shevchenko posted 13 patches 11 months, 1 week ago
drivers/pinctrl/bcm/pinctrl-ns.c              |  4 +--
drivers/pinctrl/core.c                        | 11 +++---
drivers/pinctrl/core.h                        | 17 +++++----
drivers/pinctrl/freescale/pinctrl-imx.c       | 31 ++++++++--------
drivers/pinctrl/mediatek/pinctrl-moore.c      | 13 ++++---
drivers/pinctrl/mediatek/pinctrl-moore.h      | 10 +++---
drivers/pinctrl/mediatek/pinctrl-paris.h      | 10 +++---
drivers/pinctrl/pinctrl-equilibrium.c         |  4 +--
drivers/pinctrl/pinctrl-ingenic.c             | 35 ++++++++++---------
drivers/pinctrl/pinctrl-keembay.c             |  2 +-
drivers/pinctrl/renesas/pinctrl-rza1.c        |  2 +-
drivers/pinctrl/renesas/pinctrl-rza2.c        | 10 +++---
drivers/pinctrl/renesas/pinctrl-rzg2l.c       |  4 +--
drivers/pinctrl/renesas/pinctrl-rzv2m.c       |  4 +--
.../starfive/pinctrl-starfive-jh7100.c        |  8 ++---
.../starfive/pinctrl-starfive-jh7110.c        |  8 ++---
16 files changed, 84 insertions(+), 89 deletions(-)
[PATCH v5 00/13] pinctrl: Convert struct group_desc to use struct pingroup
Posted by Andy Shevchenko 11 months, 1 week ago
The struct group_desc has a lot of duplication with struct pingroup.
Deduplicate that by embeddind the latter in the former and convert
users.

NB. The function_desc is in plan to follow the similar deduplication.

This time test-compiled with old GCC 8 for arm64, besides GCC 13 and
LLVM 16 for x86_64.

In v5:
- dropped applied patches
- elaborated the need of the conversion (Fabio)
- reworked to avoid build errors on old GCC (Marek, Krzysztof, Geert)

v4: https://lore.kernel.org/r/20231129161459.1002323-1-andriy.shevchenko@linux.intel.com

In v4:
- made pins also unsigned in struct group_desc (Geert)
- made local pins variable unsigned in renesas drivers (Geert)
- collected more tags (Paul, Geert)

v3: https://lore.kernel.org/r/20231128200155.438722-1-andriy.shevchenko@linux.intel.com

In v3:
- fixed reported bug in equilibrium code (LKP)                                                                   - collected tags (Emil, Florian, Paul)

v2: https://lore.kernel.org/r/20231123193355.3400852-1-andriy.shevchenko@linux.intel.com

In v2:
- added a few patches to fix multiple compile-time errors (LKP)
- added tag (Jonathan)

v1: https://lore.kernel.org/r/20231122164040.2262742-1-andriy.shevchenko@linux.intel.com

Andy Shevchenko (13):
  pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
  pinctrl: mediatek: Use C99 initializers in PINCTRL_PIN_GROUP()
  pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP()
  pinctrl: core: Embed struct pingroup into struct group_desc
  pinctrl: bcm: Convert to use grp member
  pinctrl: equilibrium: Convert to use grp member
  pinctrl: imx: Convert to use grp member
  pinctrl: ingenic: Convert to use grp member
  pinctrl: keembay: Convert to use grp member
  pinctrl: mediatek: Convert to use grp member
  pinctrl: renesas: Convert to use grp member
  pinctrl: starfive: Convert to use grp member
  pinctrl: core: Remove unused members from struct group_desc

 drivers/pinctrl/bcm/pinctrl-ns.c              |  4 +--
 drivers/pinctrl/core.c                        | 11 +++---
 drivers/pinctrl/core.h                        | 17 +++++----
 drivers/pinctrl/freescale/pinctrl-imx.c       | 31 ++++++++--------
 drivers/pinctrl/mediatek/pinctrl-moore.c      | 13 ++++---
 drivers/pinctrl/mediatek/pinctrl-moore.h      | 10 +++---
 drivers/pinctrl/mediatek/pinctrl-paris.h      | 10 +++---
 drivers/pinctrl/pinctrl-equilibrium.c         |  4 +--
 drivers/pinctrl/pinctrl-ingenic.c             | 35 ++++++++++---------
 drivers/pinctrl/pinctrl-keembay.c             |  2 +-
 drivers/pinctrl/renesas/pinctrl-rza1.c        |  2 +-
 drivers/pinctrl/renesas/pinctrl-rza2.c        | 10 +++---
 drivers/pinctrl/renesas/pinctrl-rzg2l.c       |  4 +--
 drivers/pinctrl/renesas/pinctrl-rzv2m.c       |  4 +--
 .../starfive/pinctrl-starfive-jh7100.c        |  8 ++---
 .../starfive/pinctrl-starfive-jh7110.c        |  8 ++---
 16 files changed, 84 insertions(+), 89 deletions(-)

-- 
2.43.0.rc1.1.gbec44491f096
Re: [PATCH v5 00/13] pinctrl: Convert struct group_desc to use struct pingroup
Posted by Linus Walleij 11 months, 1 week ago
On Mon, Dec 11, 2023 at 8:03 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The struct group_desc has a lot of duplication with struct pingroup.
> Deduplicate that by embeddind the latter in the former and convert
> users.
>
> NB. The function_desc is in plan to follow the similar deduplication.
>
> This time test-compiled with old GCC 8 for arm64, besides GCC 13 and
> LLVM 16 for x86_64.

Applied to my pin control devel branch for v6.8.

Yours,
Linus Walleij