Skip to content

Commit 885b92b

Browse files
committed
Merge patch series "pinctrl: intel: Convert the rest to use INTEL_GPP()"
Andy Shevchenko <andriy.shevchenko@linux.intel.com> says: A few drivers use the more customised versions of INTEL_GPP(). Convert them to use INTEL_GPP() directly. Link: https://patch.msgid.link/20251111191214.1378051-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2 parents 396f45a + cc4e46f commit 885b92b

5 files changed

Lines changed: 73 additions & 107 deletions

File tree

drivers/pinctrl/intel/pinctrl-cedarfork.c

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
#define CDF_GPI_IS 0x200
2222
#define CDF_GPI_IE 0x230
2323

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

@@ -288,24 +281,24 @@ static const struct pinctrl_pin_desc cdf_pins[] = {
288281
};
289282

290283
static const struct intel_padgroup cdf_community0_gpps[] = {
291-
CDF_GPP(0, 0, 23), /* WEST2 */
292-
CDF_GPP(1, 24, 47), /* WEST3 */
293-
CDF_GPP(2, 48, 70), /* WEST01 */
294-
CDF_GPP(3, 71, 90), /* WEST5 */
295-
CDF_GPP(4, 91, 96), /* WESTC */
296-
CDF_GPP(5, 97, 101), /* WESTC_DFX */
297-
CDF_GPP(6, 102, 111), /* WESTA */
298-
CDF_GPP(7, 112, 123), /* WESTB */
299-
CDF_GPP(8, 124, 143), /* WESTD */
300-
CDF_GPP(9, 144, 144), /* WESTD_PECI */
301-
CDF_GPP(10, 145, 167), /* WESTF */
284+
INTEL_GPP(0, 0, 23, 0), /* WEST2 */
285+
INTEL_GPP(1, 24, 47, 24), /* WEST3 */
286+
INTEL_GPP(2, 48, 70, 48), /* WEST01 */
287+
INTEL_GPP(3, 71, 90, 71), /* WEST5 */
288+
INTEL_GPP(4, 91, 96, 91), /* WESTC */
289+
INTEL_GPP(5, 97, 101, 97), /* WESTC_DFX */
290+
INTEL_GPP(6, 102, 111, 102), /* WESTA */
291+
INTEL_GPP(7, 112, 123, 112), /* WESTB */
292+
INTEL_GPP(8, 124, 143, 124), /* WESTD */
293+
INTEL_GPP(9, 144, 144, 144), /* WESTD_PECI */
294+
INTEL_GPP(10, 145, 167, 145), /* WESTF */
302295
};
303296

304297
static const struct intel_padgroup cdf_community1_gpps[] = {
305-
CDF_GPP(0, 168, 191), /* EAST2 */
306-
CDF_GPP(1, 192, 202), /* EAST3 */
307-
CDF_GPP(2, 203, 225), /* EAST0 */
308-
CDF_GPP(3, 226, 236), /* EMMC */
298+
INTEL_GPP(0, 168, 191, 168), /* EAST2 */
299+
INTEL_GPP(1, 192, 202, 192), /* EAST3 */
300+
INTEL_GPP(2, 203, 225, 203), /* EAST0 */
301+
INTEL_GPP(3, 226, 236, 226), /* EMMC */
309302
};
310303

311304
static const struct intel_community cdf_communities[] = {

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ struct intel_community_context {
9292

9393
#define PINMODE(m, i) ((m) | ((i) * PINMODE_INVERT_OE))
9494

95-
#define CHV_GPP(start, end) \
96-
{ \
97-
.base = (start), \
98-
.size = (end) - (start) + 1, \
99-
}
100-
10195
#define CHV_COMMUNITY(g, i, a) \
10296
{ \
10397
.gpps = (g), \
@@ -258,13 +252,13 @@ static const struct intel_function southwest_functions[] = {
258252
};
259253

260254
static const struct intel_padgroup southwest_gpps[] = {
261-
CHV_GPP(0, 7),
262-
CHV_GPP(15, 22),
263-
CHV_GPP(30, 37),
264-
CHV_GPP(45, 52),
265-
CHV_GPP(60, 67),
266-
CHV_GPP(75, 82),
267-
CHV_GPP(90, 97),
255+
INTEL_GPP(0, 0, 7, 0),
256+
INTEL_GPP(1, 15, 22, 15),
257+
INTEL_GPP(2, 30, 37, 30),
258+
INTEL_GPP(3, 45, 52, 45),
259+
INTEL_GPP(4, 60, 67, 60),
260+
INTEL_GPP(5, 75, 82, 75),
261+
INTEL_GPP(6, 90, 97, 90),
268262
};
269263

270264
/*
@@ -354,11 +348,11 @@ static const struct pinctrl_pin_desc north_pins[] = {
354348
};
355349

356350
static const struct intel_padgroup north_gpps[] = {
357-
CHV_GPP(0, 8),
358-
CHV_GPP(15, 27),
359-
CHV_GPP(30, 41),
360-
CHV_GPP(45, 56),
361-
CHV_GPP(60, 72),
351+
INTEL_GPP(0, 0, 8, 0),
352+
INTEL_GPP(1, 15, 27, 15),
353+
INTEL_GPP(2, 30, 41, 30),
354+
INTEL_GPP(3, 45, 56, 45),
355+
INTEL_GPP(4, 60, 72, 60),
362356
};
363357

364358
/*
@@ -406,8 +400,8 @@ static const struct pinctrl_pin_desc east_pins[] = {
406400
};
407401

408402
static const struct intel_padgroup east_gpps[] = {
409-
CHV_GPP(0, 11),
410-
CHV_GPP(15, 26),
403+
INTEL_GPP(0, 0, 11, 0),
404+
INTEL_GPP(1, 15, 26, 15),
411405
};
412406

413407
static const struct intel_community east_communities[] = {
@@ -526,12 +520,12 @@ static const struct intel_function southeast_functions[] = {
526520
};
527521

528522
static const struct intel_padgroup southeast_gpps[] = {
529-
CHV_GPP(0, 7),
530-
CHV_GPP(15, 26),
531-
CHV_GPP(30, 35),
532-
CHV_GPP(45, 52),
533-
CHV_GPP(60, 69),
534-
CHV_GPP(75, 85),
523+
INTEL_GPP(0, 0, 7, 0),
524+
INTEL_GPP(1, 15, 26, 15),
525+
INTEL_GPP(2, 30, 35, 30),
526+
INTEL_GPP(3, 45, 52, 45),
527+
INTEL_GPP(4, 60, 69, 60),
528+
INTEL_GPP(5, 75, 85, 75),
535529
};
536530

537531
static const struct intel_community southeast_communities[] = {

drivers/pinctrl/intel/pinctrl-denverton.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
#define DNV_GPI_IS 0x100
2222
#define DNV_GPI_IE 0x120
2323

24-
#define DNV_GPP(n, s, e) \
25-
{ \
26-
.reg_num = (n), \
27-
.base = (s), \
28-
.size = ((e) - (s) + 1), \
29-
}
30-
3124
#define DNV_COMMUNITY(b, s, e, g) \
3225
INTEL_COMMUNITY_GPPS(b, s, e, g, DNV)
3326

@@ -222,16 +215,16 @@ static const struct intel_function dnv_functions[] = {
222215
};
223216

224217
static const struct intel_padgroup dnv_north_gpps[] = {
225-
DNV_GPP(0, 0, 31), /* North ALL_0 */
226-
DNV_GPP(1, 32, 40), /* North ALL_1 */
218+
INTEL_GPP(0, 0, 31, 0), /* North ALL_0 */
219+
INTEL_GPP(1, 32, 40, 32), /* North ALL_1 */
227220
};
228221

229222
static const struct intel_padgroup dnv_south_gpps[] = {
230-
DNV_GPP(0, 41, 58), /* South DFX */
231-
DNV_GPP(1, 59, 90), /* South GPP0_0 */
232-
DNV_GPP(2, 91, 111), /* South GPP0_1 */
233-
DNV_GPP(3, 112, 143), /* South GPP1_0 */
234-
DNV_GPP(4, 144, 153), /* South GPP1_1 */
223+
INTEL_GPP(0, 41, 58, 41), /* South DFX */
224+
INTEL_GPP(1, 59, 90, 59), /* South GPP0_0 */
225+
INTEL_GPP(2, 91, 111, 91), /* South GPP0_1 */
226+
INTEL_GPP(3, 112, 143, 112), /* South GPP1_0 */
227+
INTEL_GPP(4, 144, 153, 144), /* South GPP1_1 */
235228
};
236229

237230
static const struct intel_community dnv_communities[] = {

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[] = {

drivers/pinctrl/intel/pinctrl-emmitsburg.c

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
#define EBG_GPI_IS 0x200
2222
#define EBG_GPI_IE 0x210
2323

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

@@ -311,31 +304,31 @@ static const struct pinctrl_pin_desc ebg_pins[] = {
311304
};
312305

313306
static const struct intel_padgroup ebg_community0_gpps[] = {
314-
EBG_GPP(0, 0, 20), /* GPP_A */
315-
EBG_GPP(1, 21, 44), /* GPP_B */
316-
EBG_GPP(2, 45, 65), /* SPI */
307+
INTEL_GPP(0, 0, 20, 0), /* GPP_A */
308+
INTEL_GPP(1, 21, 44, 21), /* GPP_B */
309+
INTEL_GPP(2, 45, 65, 45), /* SPI */
317310
};
318311

319312
static const struct intel_padgroup ebg_community1_gpps[] = {
320-
EBG_GPP(0, 66, 87), /* GPP_C */
321-
EBG_GPP(1, 88, 111), /* GPP_D */
313+
INTEL_GPP(0, 66, 87, 66), /* GPP_C */
314+
INTEL_GPP(1, 88, 111, 88), /* GPP_D */
322315
};
323316

324317
static const struct intel_padgroup ebg_community3_gpps[] = {
325-
EBG_GPP(0, 112, 135), /* GPP_E */
326-
EBG_GPP(1, 136, 145), /* JTAG */
318+
INTEL_GPP(0, 112, 135, 112), /* GPP_E */
319+
INTEL_GPP(1, 136, 145, 136), /* JTAG */
327320
};
328321

329322
static const struct intel_padgroup ebg_community4_gpps[] = {
330-
EBG_GPP(0, 146, 165), /* GPP_H */
331-
EBG_GPP(1, 166, 183), /* GPP_J */
323+
INTEL_GPP(0, 146, 165, 146), /* GPP_H */
324+
INTEL_GPP(1, 166, 183, 166), /* GPP_J */
332325
};
333326

334327
static const struct intel_padgroup ebg_community5_gpps[] = {
335-
EBG_GPP(0, 184, 207), /* GPP_I */
336-
EBG_GPP(1, 208, 225), /* GPP_L */
337-
EBG_GPP(2, 226, 243), /* GPP_M */
338-
EBG_GPP(3, 244, 261), /* GPP_N */
328+
INTEL_GPP(0, 184, 207, 184), /* GPP_I */
329+
INTEL_GPP(1, 208, 225, 208), /* GPP_L */
330+
INTEL_GPP(2, 226, 243, 226), /* GPP_M */
331+
INTEL_GPP(3, 244, 261, 244), /* GPP_N */
339332
};
340333

341334
static const struct intel_community ebg_communities[] = {

0 commit comments

Comments
 (0)