Use INTEL_COMMUNITY_GPPS() common macro instead custom ICL_COMMUNITY(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/pinctrl/intel/pinctrl-icelake.c | 35 +++++++++---------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-icelake.c b/drivers/pinctrl/intel/pinctrl-icelake.c index 84a56d9ae47e..1c64b4a1c491 100644 --- a/drivers/pinctrl/intel/pinctrl-icelake.c +++ b/drivers/pinctrl/intel/pinctrl-icelake.c @@ -15,12 +15,17 @@ #include "pinctrl-intel.h" -#define ICL_PAD_OWN 0x020 -#define ICL_PADCFGLOCK 0x080 -#define ICL_HOSTSW_OWN 0x0b0 -#define ICL_GPI_IS 0x100 -#define ICL_LP_GPI_IE 0x110 -#define ICL_N_GPI_IE 0x120 +#define ICL_LP_PAD_OWN 0x020 +#define ICL_LP_PADCFGLOCK 0x080 +#define ICL_LP_HOSTSW_OWN 0x0b0 +#define ICL_LP_GPI_IS 0x100 +#define ICL_LP_GPI_IE 0x110 + +#define ICL_N_PAD_OWN 0x020 +#define ICL_N_PADCFGLOCK 0x080 +#define ICL_N_HOSTSW_OWN 0x0b0 +#define ICL_N_GPI_IS 0x100 +#define ICL_N_GPI_IE 0x120 #define ICL_GPP(r, s, e, g) \ { \ @@ -30,25 +35,11 @@ .gpio_base = (g), \ } -#define ICL_COMMUNITY(b, s, e, g, v) \ - { \ - .barno = (b), \ - .padown_offset = ICL_PAD_OWN, \ - .padcfglock_offset = ICL_PADCFGLOCK, \ - .hostown_offset = ICL_HOSTSW_OWN, \ - .is_offset = ICL_GPI_IS, \ - .ie_offset = ICL_##v##_GPI_IE, \ - .pin_base = (s), \ - .npins = ((e) - (s) + 1), \ - .gpps = (g), \ - .ngpps = ARRAY_SIZE(g), \ - } - #define ICL_LP_COMMUNITY(b, s, e, g) \ - ICL_COMMUNITY(b, s, e, g, LP) + INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_LP) #define ICL_N_COMMUNITY(b, s, e, g) \ - ICL_COMMUNITY(b, s, e, g, N) + INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_N) /* Ice Lake-LP */ static const struct pinctrl_pin_desc icllp_pins[] = { -- 2.35.1