mbox series

[v1,00/17] pinctrl: Convert struct group_desc to use struct pingroup

Message ID 20231122164040.2262742-1-andriy.shevchenko@linux.intel.com (mailing list archive)
Headers show
Series pinctrl: Convert struct group_desc to use struct pingroup | expand

Message

Andy Shevchenko Nov. 22, 2023, 4:35 p.m. UTC
The struct group_desc has a lot of duplication with struct pingroup. 
Deduplicate that by embeddind the latter in the former and convert
users.

Linus, assuming everything is fine, I can push this to my tree.
Or you can apply it (assumming all CIs and people are happy with
the series).

NB. This series contains previously sent patches for Qualcomm and
Nuovoton. Here the updated version for Qualcomm that splits previous
patch to two and fixes compilation warnings.

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

Andy Shevchenko (17):
  pinctrl: equilibrium: Convert to use struct pingroup
  pinctrl: nuvoton: Convert to use struct pingroup and
    PINCTRL_PINGROUP()
  pinctrl: qcom: lpass-lpi: Replace kernel.h with what is being used
  pinctrl: qcom: lpass-lpi: Remove unused member in struct lpi_pingroup
  pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
  pinctrl: ingenic: Make use of PINCTRL_GROUP_DESC()
  pinctrl: mediatek: Make use of PINCTRL_GROUP_DESC()
  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       | 44 +++++++++----------
 drivers/pinctrl/mediatek/pinctrl-moore.c      | 13 +++---
 drivers/pinctrl/mediatek/pinctrl-moore.h      |  7 +--
 drivers/pinctrl/mediatek/pinctrl-paris.h      |  7 +--
 drivers/pinctrl/nuvoton/pinctrl-wpcm450.c     |  9 ++--
 drivers/pinctrl/pinctrl-equilibrium.c         | 36 +++++++--------
 drivers/pinctrl/pinctrl-ingenic.c             | 27 +++++-------
 drivers/pinctrl/pinctrl-keembay.c             | 11 +++--
 drivers/pinctrl/qcom/pinctrl-lpass-lpi.h      |  6 +--
 .../pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c   | 16 -------
 .../pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 20 ---------
 .../pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c   | 20 ---------
 .../pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c   | 15 -------
 .../pinctrl/qcom/pinctrl-sm8350-lpass-lpi.c   | 16 -------
 .../pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c   | 24 ----------
 .../pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c   | 24 ----------
 .../pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c   | 24 ----------
 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 ++--
 26 files changed, 102 insertions(+), 285 deletions(-)

Comments

Jonathan Neuschäfer Nov. 23, 2023, 11:10 a.m. UTC | #1
On Wed, Nov 22, 2023 at 06:35:32PM +0200, Andy Shevchenko 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.

It is strange to me that struct pingroup was introduced without any
reference to the pre-existing struct group_desc, but it's good to see
them unified at last.

Even better might be to move the definitions next to each other in the
same file, so that anyone who finds one, also finds the other.


Thanks,
Jonathan

> 
> Linus, assuming everything is fine, I can push this to my tree.
> Or you can apply it (assumming all CIs and people are happy with
> the series).
> 
> NB. This series contains previously sent patches for Qualcomm and
> Nuovoton. Here the updated version for Qualcomm that splits previous
> patch to two and fixes compilation warnings.
> 
> NB. The function_desc is in plan to follow the similar deduplication.
Andy Shevchenko Nov. 23, 2023, 4:09 p.m. UTC | #2
On Thu, Nov 23, 2023 at 12:10:57PM +0100, J. Neuschäfer wrote:
> On Wed, Nov 22, 2023 at 06:35:32PM +0200, Andy Shevchenko 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.
> 
> It is strange to me that struct pingroup was introduced without any
> reference to the pre-existing struct group_desc, but it's good to see
> them unified at last.

Yep!

> Even better might be to move the definitions next to each other in the
> same file, so that anyone who finds one, also finds the other.

group_desc is a private to pin control generic implementation, pingroup is
generic for any pin control driver. Their current split is a right thing
to do, so no action required in this sense.

Thank you for review!

> > Linus, assuming everything is fine, I can push this to my tree.
> > Or you can apply it (assumming all CIs and people are happy with
> > the series).
> > 
> > NB. This series contains previously sent patches for Qualcomm and
> > Nuovoton. Here the updated version for Qualcomm that splits previous
> > patch to two and fixes compilation warnings.
> > 
> > NB. The function_desc is in plan to follow the similar deduplication.