Lines Matching full:community
94 struct intel_community *community; in intel_get_community() local
98 community = &pctrl->communities[i]; in intel_get_community()
99 if (pin >= community->pin_base && in intel_get_community()
100 pin < community->pin_base + community->npins) in intel_get_community()
101 return community; in intel_get_community()
104 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community()
109 intel_community_get_padgroup(const struct intel_community *community, in intel_community_get_padgroup() argument
114 for (i = 0; i < community->ngpps; i++) { in intel_community_get_padgroup()
115 const struct intel_padgroup *padgrp = &community->gpps[i]; in intel_community_get_padgroup()
127 const struct intel_community *community; in intel_get_padcfg() local
131 community = intel_get_community(pctrl, pin); in intel_get_padcfg()
132 if (!community) in intel_get_padcfg()
135 padno = pin_to_padno(community, pin); in intel_get_padcfg()
136 nregs = (community->features & PINCTRL_FEATURE_DEBOUNCE) ? 4 : 2; in intel_get_padcfg()
141 return community->pad_regs + reg + padno * nregs * 4; in intel_get_padcfg()
146 const struct intel_community *community; in intel_pad_owned_by_host() local
151 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host()
152 if (!community) in intel_pad_owned_by_host()
154 if (!community->padown_offset) in intel_pad_owned_by_host()
157 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_owned_by_host()
163 offset = community->padown_offset + padgrp->padown_num * 4 + gpp * 4; in intel_pad_owned_by_host()
164 padown = community->regs + offset; in intel_pad_owned_by_host()
171 const struct intel_community *community; in intel_pad_acpi_mode() local
176 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode()
177 if (!community) in intel_pad_acpi_mode()
179 if (!community->hostown_offset) in intel_pad_acpi_mode()
182 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_acpi_mode()
187 offset = community->hostown_offset + padgrp->reg_num * 4; in intel_pad_acpi_mode()
188 hostown = community->regs + offset; in intel_pad_acpi_mode()
214 struct intel_community *community; in intel_pad_locked() local
220 community = intel_get_community(pctrl, pin); in intel_pad_locked()
221 if (!community) in intel_pad_locked()
223 if (!community->padcfglock_offset) in intel_pad_locked()
226 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_locked()
237 offset = community->padcfglock_offset + 0 + padgrp->reg_num * 8; in intel_pad_locked()
238 value = readl(community->regs + offset); in intel_pad_locked()
242 offset = community->padcfglock_offset + 4 + padgrp->reg_num * 8; in intel_pad_locked()
243 value = readl(community->regs + offset); in intel_pad_locked()
529 const struct intel_community *community; in intel_config_get_pull() local
534 community = intel_get_community(pctrl, pin); in intel_config_get_pull()
576 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
581 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
665 const struct intel_community *community; in intel_config_set_pull() local
671 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
726 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
733 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
850 * @community: Community is filled here if not %NULL
858 const struct intel_community **community, in intel_gpio_to_pin() argument
878 if (community) in intel_gpio_to_pin()
879 *community = comm; in intel_gpio_to_pin()
900 const struct intel_community *community; in intel_pin_to_gpio() local
903 community = intel_get_community(pctrl, pin); in intel_pin_to_gpio()
904 if (!community) in intel_pin_to_gpio()
907 padgrp = intel_community_get_padgroup(community, pin); in intel_pin_to_gpio()
1019 const struct intel_community *community; in intel_gpio_irq_ack() local
1023 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
1029 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_ack()
1032 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_ack()
1041 const struct intel_community *community; in intel_gpio_irq_mask_unmask() local
1045 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_mask_unmask()
1055 reg = community->regs + community->ie_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1056 is = community->regs + community->is_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1156 const struct intel_community *community) in intel_gpio_community_irq_handler() argument
1162 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_community_irq_handler()
1163 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_gpio_community_irq_handler()
1169 pending = readl(community->regs + community->is_offset + in intel_gpio_community_irq_handler()
1171 enabled = readl(community->regs + community->ie_offset + in intel_gpio_community_irq_handler()
1195 const struct intel_community *community; in intel_gpio_irq() local
1202 community = &pctrl->communities[i]; in intel_gpio_irq()
1203 ret += intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1214 const struct intel_community *community; in intel_gpio_irq_init() local
1218 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1219 base = community->regs; in intel_gpio_irq_init()
1221 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_irq_init()
1223 writel(0, base + community->ie_offset + gpp * 4); in intel_gpio_irq_init()
1224 writel(0xffff, base + community->is_offset + gpp * 4); in intel_gpio_irq_init()
1243 const struct intel_community *community) in intel_gpio_add_community_ranges() argument
1247 for (i = 0; i < community->ngpps; i++) { in intel_gpio_add_community_ranges()
1248 const struct intel_padgroup *gpp = &community->gpps[i]; in intel_gpio_add_community_ranges()
1269 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_add_pin_ranges() local
1271 ret = intel_gpio_add_community_ranges(pctrl, community); in intel_gpio_add_pin_ranges()
1283 const struct intel_community *community; in intel_gpio_ngpio() local
1288 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1289 for (j = 0; j < community->ngpps; j++) { in intel_gpio_ngpio()
1290 const struct intel_padgroup *gpp = &community->gpps[j]; in intel_gpio_ngpio()
1358 struct intel_community *community) in intel_pinctrl_add_padgroups() argument
1361 unsigned int npins = community->npins; in intel_pinctrl_add_padgroups()
1365 if (community->gpps) in intel_pinctrl_add_padgroups()
1366 ngpps = community->ngpps; in intel_pinctrl_add_padgroups()
1368 ngpps = DIV_ROUND_UP(community->npins, community->gpp_size); in intel_pinctrl_add_padgroups()
1375 if (community->gpps) { in intel_pinctrl_add_padgroups()
1376 gpps[i] = community->gpps[i]; in intel_pinctrl_add_padgroups()
1378 unsigned int gpp_size = community->gpp_size; in intel_pinctrl_add_padgroups()
1381 gpps[i].base = community->pin_base + i * gpp_size; in intel_pinctrl_add_padgroups()
1408 if (community->gpp_num_padown_regs) in intel_pinctrl_add_padgroups()
1409 padown_num += community->gpp_num_padown_regs; in intel_pinctrl_add_padgroups()
1414 community->ngpps = ngpps; in intel_pinctrl_add_padgroups()
1415 community->gpps = gpps; in intel_pinctrl_add_padgroups()
1439 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init() local
1442 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1449 hostown = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1489 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe() local
1493 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1495 regs = devm_platform_ioremap_resource(pdev, community->barno); in intel_pinctrl_probe()
1500 * Determine community features based on the revision if in intel_pinctrl_probe()
1503 if (!community->features) { in intel_pinctrl_probe()
1508 community->features |= PINCTRL_FEATURE_DEBOUNCE; in intel_pinctrl_probe()
1509 community->features |= PINCTRL_FEATURE_1K_PD; in intel_pinctrl_probe()
1516 community->regs = regs; in intel_pinctrl_probe()
1517 community->pad_regs = regs + padbar; in intel_pinctrl_probe()
1519 ret = intel_pinctrl_add_padgroups(pctrl, community); in intel_pinctrl_probe()
1682 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend_noirq() local
1686 base = community->regs + community->ie_offset; in intel_pinctrl_suspend_noirq()
1687 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1690 base = community->regs + community->hostown_offset; in intel_pinctrl_suspend_noirq()
1691 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1716 const struct intel_community *community = &pctrl->communities[c]; in intel_restore_hostown() local
1717 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_restore_hostown()
1793 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume_noirq() local
1797 base = community->regs + community->ie_offset; in intel_pinctrl_resume_noirq()
1798 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()
1801 base = community->regs + community->hostown_offset; in intel_pinctrl_resume_noirq()
1802 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()