From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Ulrich Hecht <uli+renesas@fpond.eu>,
Biju Das <biju.das.jz@bp.renesas.com>,
linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 2/6] pinctrl: renesas: Move R-Car bias helpers to sh_pfc.h
Date: Mon, 22 Mar 2021 15:35:30 +0100 [thread overview]
Message-ID: <YFirMvd5jvGN0QDR@oden.dyn.berto.se> (raw)
In-Reply-To: <20210303132619.3938128-3-geert+renesas@glider.be>
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@glider.be>
Nice cleanup.
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> 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
next prev parent reply other threads:[~2021-03-22 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 13:26 [PATCH 0/6] pinctrl: renesas: Bias improvements and r8a7791 support Geert Uytterhoeven
2021-03-03 13:26 ` [PATCH 1/6] pinctrl: renesas: Make sh_pfc_pin_to_bias_reg() static Geert Uytterhoeven
2021-03-22 14:30 ` Niklas Söderlund
2021-03-03 13:26 ` [PATCH 2/6] pinctrl: renesas: Move R-Car bias helpers to sh_pfc.h Geert Uytterhoeven
2021-03-22 14:35 ` Niklas Söderlund [this message]
2021-03-03 13:26 ` [PATCH 3/6] pinctrl: renesas: Factor out common R-Mobile bias handling Geert Uytterhoeven
2021-03-22 14:47 ` Niklas Söderlund
2021-03-03 13:26 ` [PATCH 4/6] pinctrl: renesas: Add PORT_GP_CFG_7 macros Geert Uytterhoeven
2021-03-22 14:50 ` Niklas Söderlund
2021-03-03 13:26 ` [PATCH 5/6] pinctrl: renesas: Add support for R-Car SoCs with pull-down only pins Geert Uytterhoeven
2021-03-22 15:07 ` Niklas Söderlund
2021-03-22 15:11 ` Geert Uytterhoeven
2021-03-03 13:26 ` [PATCH 6/6] pinctrl: renesas: r8a7791: Add bias pinconf support Geert Uytterhoeven
2021-03-22 15:10 ` Niklas Söderlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFirMvd5jvGN0QDR@oden.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=uli+renesas@fpond.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).