Skip to content

Commit cc4e46f

Browse files
committed
pinctrl: elkhartlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP(). Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent dd0c7bf commit cc4e46f

1 file changed

Lines changed: 18 additions & 25 deletions

File tree

drivers/pinctrl/intel/pinctrl-elkhartlake.c

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
#define EHL_GPI_IS 0x100
2222
#define EHL_GPI_IE 0x120
2323

24-
#define EHL_GPP(r, s, e) \
25-
{ \
26-
.reg_num = (r), \
27-
.base = (s), \
28-
.size = ((e) - (s) + 1), \
29-
}
30-
3124
#define EHL_COMMUNITY(b, s, e, g) \
3225
INTEL_COMMUNITY_GPPS(b, s, e, g, EHL)
3326

@@ -106,9 +99,9 @@ static const struct pinctrl_pin_desc ehl_community0_pins[] = {
10699
};
107100

108101
static const struct intel_padgroup ehl_community0_gpps[] = {
109-
EHL_GPP(0, 0, 25), /* GPP_B */
110-
EHL_GPP(1, 26, 41), /* GPP_T */
111-
EHL_GPP(2, 42, 66), /* GPP_G */
102+
INTEL_GPP(0, 0, 25, 0), /* GPP_B */
103+
INTEL_GPP(1, 26, 41, 26), /* GPP_T */
104+
INTEL_GPP(2, 42, 66, 42), /* GPP_G */
112105
};
113106

114107
static const struct intel_community ehl_community0[] = {
@@ -245,11 +238,11 @@ static const struct pinctrl_pin_desc ehl_community1_pins[] = {
245238
};
246239

247240
static const struct intel_padgroup ehl_community1_gpps[] = {
248-
EHL_GPP(0, 0, 15), /* GPP_V */
249-
EHL_GPP(1, 16, 39), /* GPP_H */
250-
EHL_GPP(2, 40, 60), /* GPP_D */
251-
EHL_GPP(3, 61, 84), /* GPP_U */
252-
EHL_GPP(4, 85, 112), /* vGPIO */
241+
INTEL_GPP(0, 0, 15, 0), /* GPP_V */
242+
INTEL_GPP(1, 16, 39, 16), /* GPP_H */
243+
INTEL_GPP(2, 40, 60, 40), /* GPP_D */
244+
INTEL_GPP(3, 61, 84, 61), /* GPP_U */
245+
INTEL_GPP(4, 85, 112, 85), /* vGPIO */
253246
};
254247

255248
static const struct intel_community ehl_community1[] = {
@@ -286,7 +279,7 @@ static const struct pinctrl_pin_desc ehl_community2_pins[] = {
286279
};
287280

288281
static const struct intel_padgroup ehl_community2_gpps[] = {
289-
EHL_GPP(0, 0, 16), /* DSW */
282+
INTEL_GPP(0, 0, 16, 0), /* DSW */
290283
};
291284

292285
static const struct intel_community ehl_community2[] = {
@@ -356,10 +349,10 @@ static const struct pinctrl_pin_desc ehl_community3_pins[] = {
356349
};
357350

358351
static const struct intel_padgroup ehl_community3_gpps[] = {
359-
EHL_GPP(0, 0, 16), /* CPU */
360-
EHL_GPP(1, 17, 18), /* GPP_S */
361-
EHL_GPP(2, 19, 42), /* GPP_A */
362-
EHL_GPP(3, 43, 46), /* vGPIO_3 */
352+
INTEL_GPP(0, 0, 16, 0), /* CPU */
353+
INTEL_GPP(1, 17, 18, 17), /* GPP_S */
354+
INTEL_GPP(2, 19, 42, 19), /* GPP_A */
355+
INTEL_GPP(3, 43, 46, 43), /* vGPIO_3 */
363356
};
364357

365358
static const struct intel_community ehl_community3[] = {
@@ -462,10 +455,10 @@ static const struct pinctrl_pin_desc ehl_community4_pins[] = {
462455
};
463456

464457
static const struct intel_padgroup ehl_community4_gpps[] = {
465-
EHL_GPP(0, 0, 23), /* GPP_C */
466-
EHL_GPP(1, 24, 48), /* GPP_F */
467-
EHL_GPP(2, 49, 54), /* HVCMOS */
468-
EHL_GPP(3, 55, 79), /* GPP_E */
458+
INTEL_GPP(0, 0, 23, 0), /* GPP_C */
459+
INTEL_GPP(1, 24, 48, 24), /* GPP_F */
460+
INTEL_GPP(2, 49, 54, 49), /* HVCMOS */
461+
INTEL_GPP(3, 55, 79, 55), /* GPP_E */
469462
};
470463

471464
static const struct intel_community ehl_community4[] = {
@@ -493,7 +486,7 @@ static const struct pinctrl_pin_desc ehl_community5_pins[] = {
493486
};
494487

495488
static const struct intel_padgroup ehl_community5_gpps[] = {
496-
EHL_GPP(0, 0, 7), /* GPP_R */
489+
INTEL_GPP(0, 0, 7, 0), /* GPP_R */
497490
};
498491

499492
static const struct intel_community ehl_community5[] = {

0 commit comments

Comments
 (0)