Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: sunrisepoint: Modify COMMUNITY macros to be consistent

Modify COMMUNITY macros to be consistent with Tiger Lake and others.
No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20200929110306.40852-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Andy Shevchenko and committed by
Linus Walleij
a0cec28c 701372c7

+27 -33
+27 -33
drivers/pinctrl/intel/pinctrl-sunrisepoint.c
··· 22 22 #define SPT_GPI_IS 0x100 23 23 #define SPT_GPI_IE 0x120 24 24 25 - #define SPT_COMMUNITY(b, s, e) \ 25 + #define SPT_COMMUNITY(b, s, e, pl, gs, gn, g, n) \ 26 26 { \ 27 27 .barno = (b), \ 28 28 .padown_offset = SPT_PAD_OWN, \ 29 - .padcfglock_offset = SPT_LP_PADCFGLOCK, \ 29 + .padcfglock_offset = (pl), \ 30 30 .hostown_offset = SPT_HOSTSW_OWN, \ 31 31 .is_offset = SPT_GPI_IS, \ 32 32 .ie_offset = SPT_GPI_IE, \ 33 - .gpp_size = 24, \ 34 - .gpp_num_padown_regs = 4, \ 33 + .gpp_size = (gs), \ 34 + .gpp_num_padown_regs = (gn), \ 35 35 .pin_base = (s), \ 36 36 .npins = ((e) - (s) + 1), \ 37 + .gpps = (g), \ 38 + .ngpps = (n), \ 37 39 } 38 40 39 - #define SPTH_GPP(r, s, e, g) \ 41 + #define SPT_LP_COMMUNITY(b, s, e) \ 42 + SPT_COMMUNITY(b, s, e, SPT_LP_PADCFGLOCK, 24, 4, NULL, 0) 43 + 44 + #define SPT_H_GPP(r, s, e, g) \ 40 45 { \ 41 46 .reg_num = (r), \ 42 47 .base = (s), \ ··· 49 44 .gpio_base = (g), \ 50 45 } 51 46 52 - #define SPTH_COMMUNITY(b, s, e, g) \ 53 - { \ 54 - .barno = (b), \ 55 - .padown_offset = SPT_PAD_OWN, \ 56 - .padcfglock_offset = SPT_H_PADCFGLOCK, \ 57 - .hostown_offset = SPT_HOSTSW_OWN, \ 58 - .is_offset = SPT_GPI_IS, \ 59 - .ie_offset = SPT_GPI_IE, \ 60 - .pin_base = (s), \ 61 - .npins = ((e) - (s) + 1), \ 62 - .gpps = (g), \ 63 - .ngpps = ARRAY_SIZE(g), \ 64 - } 47 + #define SPT_H_COMMUNITY(b, s, e, g) \ 48 + SPT_COMMUNITY(b, s, e, SPT_H_PADCFGLOCK, 0, 0, g, ARRAY_SIZE(g)) 65 49 66 50 /* Sunrisepoint-LP */ 67 51 static const struct pinctrl_pin_desc sptlp_pins[] = { ··· 286 292 }; 287 293 288 294 static const struct intel_community sptlp_communities[] = { 289 - SPT_COMMUNITY(0, 0, 47), 290 - SPT_COMMUNITY(1, 48, 119), 291 - SPT_COMMUNITY(2, 120, 151), 295 + SPT_LP_COMMUNITY(0, 0, 47), 296 + SPT_LP_COMMUNITY(1, 48, 119), 297 + SPT_LP_COMMUNITY(2, 120, 151), 292 298 }; 293 299 294 300 static const struct intel_pinctrl_soc_data sptlp_soc_data = { ··· 548 554 }; 549 555 550 556 static const struct intel_padgroup spth_community0_gpps[] = { 551 - SPTH_GPP(0, 0, 23, 0), /* GPP_A */ 552 - SPTH_GPP(1, 24, 47, 24), /* GPP_B */ 557 + SPT_H_GPP(0, 0, 23, 0), /* GPP_A */ 558 + SPT_H_GPP(1, 24, 47, 24), /* GPP_B */ 553 559 }; 554 560 555 561 static const struct intel_padgroup spth_community1_gpps[] = { 556 - SPTH_GPP(0, 48, 71, 48), /* GPP_C */ 557 - SPTH_GPP(1, 72, 95, 72), /* GPP_D */ 558 - SPTH_GPP(2, 96, 108, 96), /* GPP_E */ 559 - SPTH_GPP(3, 109, 132, 120), /* GPP_F */ 560 - SPTH_GPP(4, 133, 156, 144), /* GPP_G */ 561 - SPTH_GPP(5, 157, 180, 168), /* GPP_H */ 562 + SPT_H_GPP(0, 48, 71, 48), /* GPP_C */ 563 + SPT_H_GPP(1, 72, 95, 72), /* GPP_D */ 564 + SPT_H_GPP(2, 96, 108, 96), /* GPP_E */ 565 + SPT_H_GPP(3, 109, 132, 120), /* GPP_F */ 566 + SPT_H_GPP(4, 133, 156, 144), /* GPP_G */ 567 + SPT_H_GPP(5, 157, 180, 168), /* GPP_H */ 562 568 }; 563 569 564 570 static const struct intel_padgroup spth_community3_gpps[] = { 565 - SPTH_GPP(0, 181, 191, 192), /* GPP_I */ 571 + SPT_H_GPP(0, 181, 191, 192), /* GPP_I */ 566 572 }; 567 573 568 574 static const struct intel_community spth_communities[] = { 569 - SPTH_COMMUNITY(0, 0, 47, spth_community0_gpps), 570 - SPTH_COMMUNITY(1, 48, 180, spth_community1_gpps), 571 - SPTH_COMMUNITY(2, 181, 191, spth_community3_gpps), 575 + SPT_H_COMMUNITY(0, 0, 47, spth_community0_gpps), 576 + SPT_H_COMMUNITY(1, 48, 180, spth_community1_gpps), 577 + SPT_H_COMMUNITY(2, 181, 191, spth_community3_gpps), 572 578 }; 573 579 574 580 static const struct intel_pinctrl_soc_data spth_soc_data = {