Lines Matching refs: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()
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()
539 const struct intel_community *community; in intel_config_get_pull() local
544 community = intel_get_community(pctrl, pin); in intel_config_get_pull()
586 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
591 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
675 const struct intel_community *community; in intel_config_set_pull() local
681 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
736 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
743 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
871 const struct intel_community **community, in intel_gpio_to_pin() argument
891 if (community) in intel_gpio_to_pin()
892 *community = comm; in intel_gpio_to_pin()
915 const struct intel_community *community; in intel_pin_to_gpio() local
918 community = intel_get_community(pctrl, pin); in intel_pin_to_gpio()
919 if (!community) in intel_pin_to_gpio()
922 padgrp = intel_community_get_padgroup(community, pin); in intel_pin_to_gpio()
1034 const struct intel_community *community; in intel_gpio_irq_ack() local
1038 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
1044 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_ack()
1047 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_ack()
1055 const struct intel_community *community; in intel_gpio_irq_mask_unmask() local
1059 pin = intel_gpio_to_pin(pctrl, hwirq, &community, &padgrp); in intel_gpio_irq_mask_unmask()
1069 reg = community->regs + community->ie_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1070 is = community->regs + community->is_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1189 const struct intel_community *community) in intel_gpio_community_irq_handler() argument
1195 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_community_irq_handler()
1196 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_gpio_community_irq_handler()
1201 pending = readl(community->regs + community->is_offset + in intel_gpio_community_irq_handler()
1203 enabled = readl(community->regs + community->ie_offset + in intel_gpio_community_irq_handler()
1227 const struct intel_community *community; in intel_gpio_irq() local
1234 community = &pctrl->communities[i]; in intel_gpio_irq()
1235 ret += intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1246 const struct intel_community *community; in intel_gpio_irq_init() local
1250 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1251 base = community->regs; in intel_gpio_irq_init()
1253 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_irq_init()
1255 writel(0, base + community->ie_offset + gpp * 4); in intel_gpio_irq_init()
1256 writel(0xffff, base + community->is_offset + gpp * 4); in intel_gpio_irq_init()
1275 const struct intel_community *community) in intel_gpio_add_community_ranges() argument
1279 for (i = 0; i < community->ngpps; i++) { in intel_gpio_add_community_ranges()
1280 const struct intel_padgroup *gpp = &community->gpps[i]; in intel_gpio_add_community_ranges()
1301 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_add_pin_ranges() local
1303 ret = intel_gpio_add_community_ranges(pctrl, community); in intel_gpio_add_pin_ranges()
1315 const struct intel_community *community; in intel_gpio_ngpio() local
1320 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1321 for (j = 0; j < community->ngpps; j++) { in intel_gpio_ngpio()
1322 const struct intel_padgroup *gpp = &community->gpps[j]; in intel_gpio_ngpio()
1382 struct intel_community *community) in intel_pinctrl_add_padgroups_by_gpps() argument
1386 size_t i, ngpps = community->ngpps; in intel_pinctrl_add_padgroups_by_gpps()
1393 gpps[i] = community->gpps[i]; in intel_pinctrl_add_padgroups_by_gpps()
1416 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_gpps()
1422 struct intel_community *community) in intel_pinctrl_add_padgroups_by_size() argument
1425 unsigned int npins = community->npins; in intel_pinctrl_add_padgroups_by_size()
1427 size_t i, ngpps = DIV_ROUND_UP(npins, community->gpp_size); in intel_pinctrl_add_padgroups_by_size()
1429 if (community->gpp_size > 32) in intel_pinctrl_add_padgroups_by_size()
1437 unsigned int gpp_size = community->gpp_size; in intel_pinctrl_add_padgroups_by_size()
1440 gpps[i].base = community->pin_base + i * gpp_size; in intel_pinctrl_add_padgroups_by_size()
1451 if (community->gpp_num_padown_regs) in intel_pinctrl_add_padgroups_by_size()
1452 padown_num += community->gpp_num_padown_regs; in intel_pinctrl_add_padgroups_by_size()
1457 community->ngpps = ngpps; in intel_pinctrl_add_padgroups_by_size()
1458 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_size()
1482 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init() local
1485 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1492 hostown = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1532 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe() local
1537 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1539 regs = devm_platform_ioremap_resource(pdev, community->barno); in intel_pinctrl_probe()
1551 community->features |= PINCTRL_FEATURE_DEBOUNCE; in intel_pinctrl_probe()
1552 community->features |= PINCTRL_FEATURE_1K_PD; in intel_pinctrl_probe()
1561 community->features |= PINCTRL_FEATURE_GPIO_HW_INFO; in intel_pinctrl_probe()
1564 community->features |= PINCTRL_FEATURE_PWM; in intel_pinctrl_probe()
1567 community->features |= PINCTRL_FEATURE_BLINK; in intel_pinctrl_probe()
1570 community->features |= PINCTRL_FEATURE_EXP; in intel_pinctrl_probe()
1578 dev_dbg(&pdev->dev, "Community%d features: %#08x\n", i, community->features); in intel_pinctrl_probe()
1583 community->regs = regs; in intel_pinctrl_probe()
1584 community->pad_regs = regs + offset; in intel_pinctrl_probe()
1586 if (community->gpps) in intel_pinctrl_probe()
1587 ret = intel_pinctrl_add_padgroups_by_gpps(pctrl, community); in intel_pinctrl_probe()
1589 ret = intel_pinctrl_add_padgroups_by_size(pctrl, community); in intel_pinctrl_probe()
1747 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend_noirq() local
1751 base = community->regs + community->ie_offset; in intel_pinctrl_suspend_noirq()
1752 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1755 base = community->regs + community->hostown_offset; in intel_pinctrl_suspend_noirq()
1756 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1781 const struct intel_community *community = &pctrl->communities[c]; in intel_restore_hostown() local
1782 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_restore_hostown()
1853 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume_noirq() local
1857 base = community->regs + community->ie_offset; in intel_pinctrl_resume_noirq()
1858 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()
1861 base = community->regs + community->hostown_offset; in intel_pinctrl_resume_noirq()
1862 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()