diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-10-19 00:00:55 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-10-26 13:54:12 +0200 |
commit | 2d145b8bd3eb72ed577550355430930ec1057d15 (patch) | |
tree | df2d580ec25e0fbe6057f9cf770060b0f6959f3b /drivers/pinctrl/intel/pinctrl-sunrisepoint.c | |
parent | pinctrl: icelake: Deduplicate COMMUNITY macro code (diff) | |
download | linux-2d145b8bd3eb72ed577550355430930ec1057d15.tar.xz linux-2d145b8bd3eb72ed577550355430930ec1057d15.zip |
pinctrl: sunrisepoint: Deduplicate COMMUNITY macro code
Define a common COMMUNITY macro and supply a variant to it.
This removes some verbosity in macros.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-sunrisepoint.c')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c index 14eac924d43d..292b660067e9 100644 --- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c +++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c @@ -22,24 +22,24 @@ #define SPT_GPI_IS 0x100 #define SPT_GPI_IE 0x120 -#define SPT_COMMUNITY(b, s, e, pl, gs, gn, g, n) \ - { \ - .barno = (b), \ - .padown_offset = SPT_PAD_OWN, \ - .padcfglock_offset = (pl), \ - .hostown_offset = SPT_HOSTSW_OWN, \ - .is_offset = SPT_GPI_IS, \ - .ie_offset = SPT_GPI_IE, \ - .gpp_size = (gs), \ - .gpp_num_padown_regs = (gn), \ - .pin_base = (s), \ - .npins = ((e) - (s) + 1), \ - .gpps = (g), \ - .ngpps = (n), \ +#define SPT_COMMUNITY(b, s, e, g, n, v, gs, gn) \ + { \ + .barno = (b), \ + .padown_offset = SPT_PAD_OWN, \ + .padcfglock_offset = SPT_##v##_PADCFGLOCK, \ + .hostown_offset = SPT_HOSTSW_OWN, \ + .is_offset = SPT_GPI_IS, \ + .ie_offset = SPT_GPI_IE, \ + .gpp_size = (gs), \ + .gpp_num_padown_regs = (gn), \ + .pin_base = (s), \ + .npins = ((e) - (s) + 1), \ + .gpps = (g), \ + .ngpps = (n), \ } #define SPT_LP_COMMUNITY(b, s, e) \ - SPT_COMMUNITY(b, s, e, SPT_LP_PADCFGLOCK, 24, 4, NULL, 0) + SPT_COMMUNITY(b, s, e, NULL, 0, LP, 24, 4) #define SPT_H_GPP(r, s, e, g) \ { \ @@ -50,7 +50,7 @@ } #define SPT_H_COMMUNITY(b, s, e, g) \ - SPT_COMMUNITY(b, s, e, SPT_H_PADCFGLOCK, 0, 0, g, ARRAY_SIZE(g)) + SPT_COMMUNITY(b, s, e, g, ARRAY_SIZE(g), H, 0, 0) /* Sunrisepoint-LP */ static const struct pinctrl_pin_desc sptlp_pins[] = { |