summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-10-19 01:00:55 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-10-26 14:54:11 +0300
commitac51b59dff2c8f92292347126cd6d24201e73b89 (patch)
tree614239c1e2e0d3af8cb18473c509e6aaed56b54e /drivers/pinctrl
parentb62241545ba12735438342874aa2aa67c68bfd22 (diff)
downloadlinux-ac51b59dff2c8f92292347126cd6d24201e73b89.tar.bz2
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/intel/pinctrl-icelake.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-icelake.c b/drivers/pinctrl/intel/pinctrl-icelake.c
index 27c248cc16f7..84a56d9ae47e 100644
--- a/drivers/pinctrl/intel/pinctrl-icelake.c
+++ b/drivers/pinctrl/intel/pinctrl-icelake.c
@@ -30,14 +30,14 @@
.gpio_base = (g), \
}
-#define ICL_COMMUNITY(b, s, e, ie, 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 = (ie), \
+ .ie_offset = ICL_##v##_GPI_IE, \
.pin_base = (s), \
.npins = ((e) - (s) + 1), \
.gpps = (g), \
@@ -45,10 +45,10 @@
}
#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) \
- ICL_COMMUNITY(b, s, e, ICL_N_GPI_IE, g)
+ ICL_COMMUNITY(b, s, e, g, N)
/* Ice Lake-LP */
static const struct pinctrl_pin_desc icllp_pins[] = {