Hi Geert, Thanks for your work. On 2021-03-03 14:26:15 +0100, Geert Uytterhoeven wrote: > The Renesas Pin Function Controller driver uses two header files: > - sh_pfc.h, for use by both core code and SoC-specific drivers, > - core.h, for internal use by the core code only. > > Hence move the R-Car bias helper declarations from core.h to sh_pfc.h, > and drop the inclusion of core.h from SoC-specific drivers that no > longer need it. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Nice cleanup. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> > --- > drivers/pinctrl/renesas/core.h | 4 ---- > drivers/pinctrl/renesas/pfc-r8a7778.c | 1 - > drivers/pinctrl/renesas/pfc-r8a7792.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77950.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77951.c | 1 - > drivers/pinctrl/renesas/pfc-r8a7796.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77965.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77970.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77980.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77990.c | 1 - > drivers/pinctrl/renesas/pfc-r8a77995.c | 1 - > drivers/pinctrl/renesas/pfc-r8a779a0.c | 1 - > drivers/pinctrl/renesas/sh_pfc.h | 7 +++++++ > 13 files changed, 7 insertions(+), 15 deletions(-) > > diff --git a/drivers/pinctrl/renesas/core.h b/drivers/pinctrl/renesas/core.h > index 19f7b4308fac7a8f..51f391e9713ae9bc 100644 > --- a/drivers/pinctrl/renesas/core.h > +++ b/drivers/pinctrl/renesas/core.h > @@ -29,8 +29,4 @@ void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data); > int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin); > int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type); > > -unsigned int rcar_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin); > -void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, > - unsigned int bias); > - > #endif /* __SH_PFC_CORE_H__ */ > diff --git a/drivers/pinctrl/renesas/pfc-r8a7778.c b/drivers/pinctrl/renesas/pfc-r8a7778.c > index 75f52b1798c3c5c9..6185af9c499006e7 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a7778.c > +++ b/drivers/pinctrl/renesas/pfc-r8a7778.c > @@ -16,7 +16,6 @@ > #include <linux/kernel.h> > #include <linux/pinctrl/pinconf-generic.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define PORT_GP_PUP_1(bank, pin, fn, sfx) \ > diff --git a/drivers/pinctrl/renesas/pfc-r8a7792.c b/drivers/pinctrl/renesas/pfc-r8a7792.c > index 258f82fb31c0ec10..f54a7c81005d0a78 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a7792.c > +++ b/drivers/pinctrl/renesas/pfc-r8a7792.c > @@ -8,7 +8,6 @@ > > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CPU_ALL_GP(fn, sfx) \ > diff --git a/drivers/pinctrl/renesas/pfc-r8a77950.c b/drivers/pinctrl/renesas/pfc-r8a77950.c > index 32fe8caca70a119e..ee4ce9349aae2654 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77950.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77950.c > @@ -8,7 +8,6 @@ > #include <linux/errno.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/pfc-r8a77951.c b/drivers/pinctrl/renesas/pfc-r8a77951.c > index bdd605e41303bf3a..1c14a3925bef909b 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77951.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77951.c > @@ -9,7 +9,6 @@ > #include <linux/kernel.h> > #include <linux/sys_soc.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/pfc-r8a7796.c b/drivers/pinctrl/renesas/pfc-r8a7796.c > index 96b5b1509bb70d16..71e69f2a431e05d4 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a7796.c > +++ b/drivers/pinctrl/renesas/pfc-r8a7796.c > @@ -14,7 +14,6 @@ > #include <linux/errno.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/pfc-r8a77965.c b/drivers/pinctrl/renesas/pfc-r8a77965.c > index f15e29383d9b54fe..a5db0168fb86418e 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77965.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77965.c > @@ -15,7 +15,6 @@ > #include <linux/errno.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/pfc-r8a77970.c b/drivers/pinctrl/renesas/pfc-r8a77970.c > index e8a0fc468eb260c6..7935826cfae7c9a3 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77970.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77970.c > @@ -16,7 +16,6 @@ > #include <linux/io.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CPU_ALL_GP(fn, sfx) \ > diff --git a/drivers/pinctrl/renesas/pfc-r8a77980.c b/drivers/pinctrl/renesas/pfc-r8a77980.c > index ebd07bebaeebca07..20cff93a2a13ca17 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77980.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77980.c > @@ -16,7 +16,6 @@ > #include <linux/io.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CPU_ALL_GP(fn, sfx) \ > diff --git a/drivers/pinctrl/renesas/pfc-r8a77990.c b/drivers/pinctrl/renesas/pfc-r8a77990.c > index 0a32e3c317c1a0c5..04a74b5d08e16f4c 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77990.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77990.c > @@ -14,7 +14,6 @@ > #include <linux/errno.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/pfc-r8a77995.c b/drivers/pinctrl/renesas/pfc-r8a77995.c > index 672251d86c2de3cd..b479f87a3b23f0f1 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a77995.c > +++ b/drivers/pinctrl/renesas/pfc-r8a77995.c > @@ -14,7 +14,6 @@ > #include <linux/errno.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CPU_ALL_GP(fn, sfx) \ > diff --git a/drivers/pinctrl/renesas/pfc-r8a779a0.c b/drivers/pinctrl/renesas/pfc-r8a779a0.c > index 2250ccd0470aa504..ad6532443a785b13 100644 > --- a/drivers/pinctrl/renesas/pfc-r8a779a0.c > +++ b/drivers/pinctrl/renesas/pfc-r8a779a0.c > @@ -11,7 +11,6 @@ > #include <linux/io.h> > #include <linux/kernel.h> > > -#include "core.h" > #include "sh_pfc.h" > > #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) > diff --git a/drivers/pinctrl/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h > index 5934faeb23d756d8..2d511c7280fa49e3 100644 > --- a/drivers/pinctrl/renesas/sh_pfc.h > +++ b/drivers/pinctrl/renesas/sh_pfc.h > @@ -773,4 +773,11 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; > */ > #define RCAR_GP_PIN(bank, pin) (((bank) * 32) + (pin)) > > +/* > + * Bias helpers > + */ > +unsigned int rcar_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin); > +void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, > + unsigned int bias); > + > #endif /* __SH_PFC_H */ > -- > 2.25.1 > -- Regards, Niklas Söderlund