Skip to content

Commit ba64677

Browse files
committed
pinctrl: tigerlake: Switch to INTEL_GPP() macro
Replace custom macro with the recently defined INTEL_GPP(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 9151857 commit ba64677

1 file changed

Lines changed: 31 additions & 39 deletions

File tree

drivers/pinctrl/intel/pinctrl-tigerlake.c

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
#define TGL_H_GPI_IS 0x100
2929
#define TGL_H_GPI_IE 0x120
3030

31-
#define TGL_GPP(r, s, e, g) \
32-
{ \
33-
.reg_num = (r), \
34-
.base = (s), \
35-
.size = ((e) - (s) + 1), \
36-
.gpio_base = (g), \
37-
}
38-
3931
#define TGL_LP_COMMUNITY(b, s, e, g) \
4032
INTEL_COMMUNITY_GPPS(b, s, e, g, TGL_LP)
4133

@@ -339,30 +331,30 @@ static const struct pinctrl_pin_desc tgllp_pins[] = {
339331
};
340332

341333
static const struct intel_padgroup tgllp_community0_gpps[] = {
342-
TGL_GPP(0, 0, 25, 0), /* GPP_B */
343-
TGL_GPP(1, 26, 41, 32), /* GPP_T */
344-
TGL_GPP(2, 42, 66, 64), /* GPP_A */
334+
INTEL_GPP(0, 0, 25, 0), /* GPP_B */
335+
INTEL_GPP(1, 26, 41, 32), /* GPP_T */
336+
INTEL_GPP(2, 42, 66, 64), /* GPP_A */
345337
};
346338

347339
static const struct intel_padgroup tgllp_community1_gpps[] = {
348-
TGL_GPP(0, 67, 74, 96), /* GPP_S */
349-
TGL_GPP(1, 75, 98, 128), /* GPP_H */
350-
TGL_GPP(2, 99, 119, 160), /* GPP_D */
351-
TGL_GPP(3, 120, 143, 192), /* GPP_U */
352-
TGL_GPP(4, 144, 170, 224), /* vGPIO */
340+
INTEL_GPP(0, 67, 74, 96), /* GPP_S */
341+
INTEL_GPP(1, 75, 98, 128), /* GPP_H */
342+
INTEL_GPP(2, 99, 119, 160), /* GPP_D */
343+
INTEL_GPP(3, 120, 143, 192), /* GPP_U */
344+
INTEL_GPP(4, 144, 170, 224), /* vGPIO */
353345
};
354346

355347
static const struct intel_padgroup tgllp_community4_gpps[] = {
356-
TGL_GPP(0, 171, 194, 256), /* GPP_C */
357-
TGL_GPP(1, 195, 219, 288), /* GPP_F */
358-
TGL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */
359-
TGL_GPP(3, 226, 250, 320), /* GPP_E */
360-
TGL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP), /* JTAG */
348+
INTEL_GPP(0, 171, 194, 256), /* GPP_C */
349+
INTEL_GPP(1, 195, 219, 288), /* GPP_F */
350+
INTEL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */
351+
INTEL_GPP(3, 226, 250, 320), /* GPP_E */
352+
INTEL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP), /* JTAG */
361353
};
362354

363355
static const struct intel_padgroup tgllp_community5_gpps[] = {
364-
TGL_GPP(0, 260, 267, 352), /* GPP_R */
365-
TGL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP), /* SPI */
356+
INTEL_GPP(0, 260, 267, 352), /* GPP_R */
357+
INTEL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP), /* SPI */
366358
};
367359

368360
static const struct intel_community tgllp_communities[] = {
@@ -691,34 +683,34 @@ static const struct pinctrl_pin_desc tglh_pins[] = {
691683
};
692684

693685
static const struct intel_padgroup tglh_community0_gpps[] = {
694-
TGL_GPP(0, 0, 24, 0), /* GPP_A */
695-
TGL_GPP(1, 25, 44, 32), /* GPP_R */
696-
TGL_GPP(2, 45, 70, 64), /* GPP_B */
697-
TGL_GPP(3, 71, 78, 96), /* vGPIO_0 */
686+
INTEL_GPP(0, 0, 24, 0), /* GPP_A */
687+
INTEL_GPP(1, 25, 44, 32), /* GPP_R */
688+
INTEL_GPP(2, 45, 70, 64), /* GPP_B */
689+
INTEL_GPP(3, 71, 78, 96), /* vGPIO_0 */
698690
};
699691

700692
static const struct intel_padgroup tglh_community1_gpps[] = {
701-
TGL_GPP(0, 79, 104, 128), /* GPP_D */
702-
TGL_GPP(1, 105, 128, 160), /* GPP_C */
703-
TGL_GPP(2, 129, 136, 192), /* GPP_S */
704-
TGL_GPP(3, 137, 153, 224), /* GPP_G */
705-
TGL_GPP(4, 154, 180, 256), /* vGPIO */
693+
INTEL_GPP(0, 79, 104, 128), /* GPP_D */
694+
INTEL_GPP(1, 105, 128, 160), /* GPP_C */
695+
INTEL_GPP(2, 129, 136, 192), /* GPP_S */
696+
INTEL_GPP(3, 137, 153, 224), /* GPP_G */
697+
INTEL_GPP(4, 154, 180, 256), /* vGPIO */
706698
};
707699

708700
static const struct intel_padgroup tglh_community3_gpps[] = {
709-
TGL_GPP(0, 181, 193, 288), /* GPP_E */
710-
TGL_GPP(1, 194, 217, 320), /* GPP_F */
701+
INTEL_GPP(0, 181, 193, 288), /* GPP_E */
702+
INTEL_GPP(1, 194, 217, 320), /* GPP_F */
711703
};
712704

713705
static const struct intel_padgroup tglh_community4_gpps[] = {
714-
TGL_GPP(0, 218, 241, 352), /* GPP_H */
715-
TGL_GPP(1, 242, 251, 384), /* GPP_J */
716-
TGL_GPP(2, 252, 266, 416), /* GPP_K */
706+
INTEL_GPP(0, 218, 241, 352), /* GPP_H */
707+
INTEL_GPP(1, 242, 251, 384), /* GPP_J */
708+
INTEL_GPP(2, 252, 266, 416), /* GPP_K */
717709
};
718710

719711
static const struct intel_padgroup tglh_community5_gpps[] = {
720-
TGL_GPP(0, 267, 281, 448), /* GPP_I */
721-
TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */
712+
INTEL_GPP(0, 267, 281, 448), /* GPP_I */
713+
INTEL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */
722714
};
723715

724716
static const struct intel_community tglh_communities[] = {

0 commit comments

Comments
 (0)