Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -4
+4 -4
drivers/pinctrl/intel/pinctrl-icelake.c
··· 30 30 .gpio_base = (g), \ 31 31 } 32 32 33 - #define ICL_COMMUNITY(b, s, e, ie, g) \ 33 + #define ICL_COMMUNITY(b, s, e, g, v) \ 34 34 { \ 35 35 .barno = (b), \ 36 36 .padown_offset = ICL_PAD_OWN, \ 37 37 .padcfglock_offset = ICL_PADCFGLOCK, \ 38 38 .hostown_offset = ICL_HOSTSW_OWN, \ 39 39 .is_offset = ICL_GPI_IS, \ 40 - .ie_offset = (ie), \ 40 + .ie_offset = ICL_##v##_GPI_IE, \ 41 41 .pin_base = (s), \ 42 42 .npins = ((e) - (s) + 1), \ 43 43 .gpps = (g), \ ··· 45 45 } 46 46 47 47 #define ICL_LP_COMMUNITY(b, s, e, g) \ 48 - ICL_COMMUNITY(b, s, e, ICL_LP_GPI_IE, g) 48 + ICL_COMMUNITY(b, s, e, g, LP) 49 49 50 50 #define ICL_N_COMMUNITY(b, s, e, g) \ 51 - ICL_COMMUNITY(b, s, e, ICL_N_GPI_IE, g) 51 + ICL_COMMUNITY(b, s, e, g, N) 52 52 53 53 /* Ice Lake-LP */ 54 54 static const struct pinctrl_pin_desc icllp_pins[] = {