Lines Matching full:community
104 struct intel_community *community; in intel_get_community() local
108 community = &pctrl->communities[i]; in intel_get_community()
109 if (pin >= community->pin_base && in intel_get_community()
110 pin < community->pin_base + community->npins) in intel_get_community()
111 return community; in intel_get_community()
114 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community()
119 intel_community_get_padgroup(const struct intel_community *community, in intel_community_get_padgroup() argument
124 for (i = 0; i < community->ngpps; i++) { in intel_community_get_padgroup()
125 const struct intel_padgroup *padgrp = &community->gpps[i]; in intel_community_get_padgroup()
137 const struct intel_community *community; in intel_get_padcfg() local
141 community = intel_get_community(pctrl, pin); in intel_get_padcfg()
142 if (!community) in intel_get_padcfg()
145 padno = pin_to_padno(community, pin); in intel_get_padcfg()
146 nregs = (community->features & PINCTRL_FEATURE_DEBOUNCE) ? 4 : 2; in intel_get_padcfg()
151 return community->pad_regs + reg + padno * nregs * 4; in intel_get_padcfg()
156 const struct intel_community *community; in intel_pad_owned_by_host() local
161 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host()
162 if (!community) in intel_pad_owned_by_host()
164 if (!community->padown_offset) in intel_pad_owned_by_host()
167 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_owned_by_host()
173 offset = community->padown_offset + padgrp->padown_num * 4 + gpp * 4; in intel_pad_owned_by_host()
174 padown = community->regs + offset; in intel_pad_owned_by_host()
181 const struct intel_community *community; in intel_pad_acpi_mode() local
186 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode()
187 if (!community) in intel_pad_acpi_mode()
189 if (!community->hostown_offset) in intel_pad_acpi_mode()
192 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_acpi_mode()
197 offset = community->hostown_offset + padgrp->reg_num * 4; in intel_pad_acpi_mode()
198 hostown = community->regs + offset; in intel_pad_acpi_mode()
224 struct intel_community *community; in intel_pad_locked() local
230 community = intel_get_community(pctrl, pin); in intel_pad_locked()
231 if (!community) in intel_pad_locked()
233 if (!community->padcfglock_offset) in intel_pad_locked()
236 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_locked()
247 offset = community->padcfglock_offset + 0 + padgrp->reg_num * 8; in intel_pad_locked()
248 value = readl(community->regs + offset); in intel_pad_locked()
252 offset = community->padcfglock_offset + 4 + padgrp->reg_num * 8; in intel_pad_locked()
253 value = readl(community->regs + offset); in intel_pad_locked()
537 const struct intel_community *community; in intel_config_get_pull() local
542 community = intel_get_community(pctrl, pin); in intel_config_get_pull()
584 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
589 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
673 const struct intel_community *community; in intel_config_set_pull() local
679 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
734 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
741 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
858 * @community: Community is filled here if not %NULL
866 const struct intel_community **community, in intel_gpio_to_pin() argument
886 if (community) in intel_gpio_to_pin()
887 *community = comm; in intel_gpio_to_pin()
908 const struct intel_community *community; in intel_pin_to_gpio() local
911 community = intel_get_community(pctrl, pin); in intel_pin_to_gpio()
912 if (!community) in intel_pin_to_gpio()
915 padgrp = intel_community_get_padgroup(community, pin); in intel_pin_to_gpio()
1027 const struct intel_community *community; in intel_gpio_irq_ack() local
1031 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
1037 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_ack()
1040 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_ack()
1049 const struct intel_community *community; in intel_gpio_irq_mask_unmask() local
1053 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_mask_unmask()
1063 reg = community->regs + community->ie_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1064 is = community->regs + community->is_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1167 const struct intel_community *community) in intel_gpio_community_irq_handler() argument
1173 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_community_irq_handler()
1174 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_gpio_community_irq_handler()
1179 pending = readl(community->regs + community->is_offset + in intel_gpio_community_irq_handler()
1181 enabled = readl(community->regs + community->ie_offset + in intel_gpio_community_irq_handler()
1205 const struct intel_community *community; in intel_gpio_irq() local
1212 community = &pctrl->communities[i]; in intel_gpio_irq()
1213 ret += intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1220 const struct intel_community *community) in intel_gpio_add_community_ranges() argument
1224 for (i = 0; i < community->ngpps; i++) { in intel_gpio_add_community_ranges()
1225 const struct intel_padgroup *gpp = &community->gpps[i]; in intel_gpio_add_community_ranges()
1246 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_add_pin_ranges() local
1248 ret = intel_gpio_add_community_ranges(pctrl, community); in intel_gpio_add_pin_ranges()
1260 const struct intel_community *community; in intel_gpio_ngpio() local
1265 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1266 for (j = 0; j < community->ngpps; j++) { in intel_gpio_ngpio()
1267 const struct intel_padgroup *gpp = &community->gpps[j]; in intel_gpio_ngpio()
1334 struct intel_community *community) in intel_pinctrl_add_padgroups_by_gpps() argument
1338 size_t i, ngpps = community->ngpps; in intel_pinctrl_add_padgroups_by_gpps()
1345 gpps[i] = community->gpps[i]; in intel_pinctrl_add_padgroups_by_gpps()
1368 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_gpps()
1374 struct intel_community *community) in intel_pinctrl_add_padgroups_by_size() argument
1377 unsigned int npins = community->npins; in intel_pinctrl_add_padgroups_by_size()
1379 size_t i, ngpps = DIV_ROUND_UP(npins, community->gpp_size); in intel_pinctrl_add_padgroups_by_size()
1381 if (community->gpp_size > 32) in intel_pinctrl_add_padgroups_by_size()
1389 unsigned int gpp_size = community->gpp_size; in intel_pinctrl_add_padgroups_by_size()
1392 gpps[i].base = community->pin_base + i * gpp_size; in intel_pinctrl_add_padgroups_by_size()
1403 if (community->gpp_num_padown_regs) in intel_pinctrl_add_padgroups_by_size()
1404 padown_num += community->gpp_num_padown_regs; in intel_pinctrl_add_padgroups_by_size()
1409 community->ngpps = ngpps; in intel_pinctrl_add_padgroups_by_size()
1410 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_size()
1434 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init() local
1437 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1444 hostown = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1484 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe() local
1489 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1491 regs = devm_platform_ioremap_resource(pdev, community->barno); in intel_pinctrl_probe()
1496 * Determine community features based on the revision. in intel_pinctrl_probe()
1503 community->features |= PINCTRL_FEATURE_DEBOUNCE; in intel_pinctrl_probe()
1504 community->features |= PINCTRL_FEATURE_1K_PD; in intel_pinctrl_probe()
1507 /* Determine community features based on the capabilities */ in intel_pinctrl_probe()
1513 community->features |= PINCTRL_FEATURE_GPIO_HW_INFO; in intel_pinctrl_probe()
1516 community->features |= PINCTRL_FEATURE_PWM; in intel_pinctrl_probe()
1519 community->features |= PINCTRL_FEATURE_BLINK; in intel_pinctrl_probe()
1522 community->features |= PINCTRL_FEATURE_EXP; in intel_pinctrl_probe()
1530 dev_dbg(&pdev->dev, "Community%d features: %#08x\n", i, community->features); in intel_pinctrl_probe()
1535 community->regs = regs; in intel_pinctrl_probe()
1536 community->pad_regs = regs + offset; in intel_pinctrl_probe()
1538 if (community->gpps) in intel_pinctrl_probe()
1539 ret = intel_pinctrl_add_padgroups_by_gpps(pctrl, community); in intel_pinctrl_probe()
1541 ret = intel_pinctrl_add_padgroups_by_size(pctrl, community); in intel_pinctrl_probe()
1681 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend_noirq() local
1685 base = community->regs + community->ie_offset; in intel_pinctrl_suspend_noirq()
1686 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1689 base = community->regs + community->hostown_offset; in intel_pinctrl_suspend_noirq()
1690 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1703 const struct intel_community *community; in intel_gpio_irq_init() local
1707 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1708 base = community->regs; in intel_gpio_irq_init()
1710 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_irq_init()
1712 writel(0, base + community->ie_offset + gpp * 4); in intel_gpio_irq_init()
1713 writel(0xffff, base + community->is_offset + gpp * 4); in intel_gpio_irq_init()
1735 const struct intel_community *community = &pctrl->communities[c]; in intel_restore_hostown() local
1736 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_restore_hostown()
1807 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume_noirq() local
1811 base = community->regs + community->ie_offset; in intel_pinctrl_resume_noirq()
1812 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()
1815 base = community->regs + community->hostown_offset; in intel_pinctrl_resume_noirq()
1816 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()