summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-10-19 00:00:55 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-10-26 13:54:11 +0200
commitb62241545ba12735438342874aa2aa67c68bfd22 (patch)
tree2e535eb05cbb9ce22ec588413dce64ed89ec705e
parentpinctrl: alderlake: Deduplicate COMMUNITY macro code (diff)
downloadlinux-b62241545ba12735438342874aa2aa67c68bfd22.tar.xz
linux-b62241545ba12735438342874aa2aa67c68bfd22.zip
pinctrl: cannonlake: 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>
-rw-r--r--drivers/pinctrl/intel/pinctrl-cannonlake.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-cannonlake.c b/drivers/pinctrl/intel/pinctrl-cannonlake.c
index 8078c7739d6a..f8a8b9b14de9 100644
--- a/drivers/pinctrl/intel/pinctrl-cannonlake.c
+++ b/drivers/pinctrl/intel/pinctrl-cannonlake.c
@@ -30,12 +30,12 @@
.gpio_base = (g), \
}
-#define CNL_COMMUNITY(b, s, e, ho, g) \
+#define CNL_COMMUNITY(b, s, e, g, v) \
{ \
.barno = (b), \
.padown_offset = CNL_PAD_OWN, \
.padcfglock_offset = CNL_PADCFGLOCK, \
- .hostown_offset = (ho), \
+ .hostown_offset = CNL_##v##_HOSTSW_OWN, \
.is_offset = CNL_GPI_IS, \
.ie_offset = CNL_GPI_IE, \
.pin_base = (s), \
@@ -45,10 +45,10 @@
}
#define CNL_LP_COMMUNITY(b, s, e, g) \
- CNL_COMMUNITY(b, s, e, CNL_LP_HOSTSW_OWN, g)
+ CNL_COMMUNITY(b, s, e, g, LP)
#define CNL_H_COMMUNITY(b, s, e, g) \
- CNL_COMMUNITY(b, s, e, CNL_H_HOSTSW_OWN, g)
+ CNL_COMMUNITY(b, s, e, g, H)
/* Cannon Lake-H */
static const struct pinctrl_pin_desc cnlh_pins[] = {