pinctrl: icelake: 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>
This commit is contained in:
Andy Shevchenko 2022-10-19 01:00:55 +03:00
parent b62241545b
commit ac51b59dff
1 changed files with 4 additions and 4 deletions

View File

@ -30,14 +30,14 @@
.gpio_base = (g), \ .gpio_base = (g), \
} }
#define ICL_COMMUNITY(b, s, e, ie, g) \ #define ICL_COMMUNITY(b, s, e, g, v) \
{ \ { \
.barno = (b), \ .barno = (b), \
.padown_offset = ICL_PAD_OWN, \ .padown_offset = ICL_PAD_OWN, \
.padcfglock_offset = ICL_PADCFGLOCK, \ .padcfglock_offset = ICL_PADCFGLOCK, \
.hostown_offset = ICL_HOSTSW_OWN, \ .hostown_offset = ICL_HOSTSW_OWN, \
.is_offset = ICL_GPI_IS, \ .is_offset = ICL_GPI_IS, \
.ie_offset = (ie), \ .ie_offset = ICL_##v##_GPI_IE, \
.pin_base = (s), \ .pin_base = (s), \
.npins = ((e) - (s) + 1), \ .npins = ((e) - (s) + 1), \
.gpps = (g), \ .gpps = (g), \
@ -45,10 +45,10 @@
} }
#define ICL_LP_COMMUNITY(b, s, e, g) \ #define ICL_LP_COMMUNITY(b, s, e, g) \
ICL_COMMUNITY(b, s, e, ICL_LP_GPI_IE, g) ICL_COMMUNITY(b, s, e, g, LP)
#define ICL_N_COMMUNITY(b, s, e, g) \ #define ICL_N_COMMUNITY(b, s, e, g) \
ICL_COMMUNITY(b, s, e, ICL_N_GPI_IE, g) ICL_COMMUNITY(b, s, e, g, N)
/* Ice Lake-LP */ /* Ice Lake-LP */
static const struct pinctrl_pin_desc icllp_pins[] = { static const struct pinctrl_pin_desc icllp_pins[] = {