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()
534 const struct intel_community *community; in intel_config_get_pull() local
539 community = intel_get_community(pctrl, pin); in intel_config_get_pull()
581 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
586 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get_pull()
670 const struct intel_community *community; in intel_config_set_pull() local
676 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
731 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
738 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
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()
910 const struct intel_community *community; in intel_pin_to_gpio() local
913 community = intel_get_community(pctrl, pin); in intel_pin_to_gpio()
914 if (!community) in intel_pin_to_gpio()
917 padgrp = intel_community_get_padgroup(community, pin); in intel_pin_to_gpio()
1029 const struct intel_community *community; in intel_gpio_irq_ack() local
1033 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
1039 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_ack()
1042 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_ack()
1050 const struct intel_community *community; in intel_gpio_irq_mask_unmask() local
1054 pin = intel_gpio_to_pin(pctrl, hwirq, &community, &padgrp); in intel_gpio_irq_mask_unmask()
1064 reg = community->regs + community->ie_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1065 is = community->regs + community->is_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1184 const struct intel_community *community) in intel_gpio_community_irq_handler() argument
1190 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_community_irq_handler()
1191 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_gpio_community_irq_handler()
1196 pending = readl(community->regs + community->is_offset + in intel_gpio_community_irq_handler()
1198 enabled = readl(community->regs + community->ie_offset + in intel_gpio_community_irq_handler()
1222 const struct intel_community *community; in intel_gpio_irq() local
1229 community = &pctrl->communities[i]; in intel_gpio_irq()
1230 ret += intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1241 const struct intel_community *community; in intel_gpio_irq_init() local
1245 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1246 base = community->regs; in intel_gpio_irq_init()
1248 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_irq_init()
1250 writel(0, base + community->ie_offset + gpp * 4); in intel_gpio_irq_init()
1251 writel(0xffff, base + community->is_offset + gpp * 4); in intel_gpio_irq_init()
1270 const struct intel_community *community) in intel_gpio_add_community_ranges() argument
1274 for (i = 0; i < community->ngpps; i++) { in intel_gpio_add_community_ranges()
1275 const struct intel_padgroup *gpp = &community->gpps[i]; in intel_gpio_add_community_ranges()
1296 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_add_pin_ranges() local
1298 ret = intel_gpio_add_community_ranges(pctrl, community); in intel_gpio_add_pin_ranges()
1310 const struct intel_community *community; in intel_gpio_ngpio() local
1315 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1316 for (j = 0; j < community->ngpps; j++) { in intel_gpio_ngpio()
1317 const struct intel_padgroup *gpp = &community->gpps[j]; in intel_gpio_ngpio()
1377 struct intel_community *community) in intel_pinctrl_add_padgroups_by_gpps() argument
1381 size_t i, ngpps = community->ngpps; in intel_pinctrl_add_padgroups_by_gpps()
1388 gpps[i] = community->gpps[i]; in intel_pinctrl_add_padgroups_by_gpps()
1411 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_gpps()
1417 struct intel_community *community) in intel_pinctrl_add_padgroups_by_size() argument
1420 unsigned int npins = community->npins; in intel_pinctrl_add_padgroups_by_size()
1422 size_t i, ngpps = DIV_ROUND_UP(npins, community->gpp_size); in intel_pinctrl_add_padgroups_by_size()
1424 if (community->gpp_size > 32) in intel_pinctrl_add_padgroups_by_size()
1432 unsigned int gpp_size = community->gpp_size; in intel_pinctrl_add_padgroups_by_size()
1435 gpps[i].base = community->pin_base + i * gpp_size; in intel_pinctrl_add_padgroups_by_size()
1446 if (community->gpp_num_padown_regs) in intel_pinctrl_add_padgroups_by_size()
1447 padown_num += community->gpp_num_padown_regs; in intel_pinctrl_add_padgroups_by_size()
1452 community->ngpps = ngpps; in intel_pinctrl_add_padgroups_by_size()
1453 community->gpps = gpps; in intel_pinctrl_add_padgroups_by_size()
1477 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init() local
1480 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1487 hostown = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1527 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe() local
1532 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1534 regs = devm_platform_ioremap_resource(pdev, community->barno); in intel_pinctrl_probe()
1546 community->features |= PINCTRL_FEATURE_DEBOUNCE; in intel_pinctrl_probe()
1547 community->features |= PINCTRL_FEATURE_1K_PD; in intel_pinctrl_probe()
1556 community->features |= PINCTRL_FEATURE_GPIO_HW_INFO; in intel_pinctrl_probe()
1559 community->features |= PINCTRL_FEATURE_PWM; in intel_pinctrl_probe()
1562 community->features |= PINCTRL_FEATURE_BLINK; in intel_pinctrl_probe()
1565 community->features |= PINCTRL_FEATURE_EXP; in intel_pinctrl_probe()
1573 dev_dbg(&pdev->dev, "Community%d features: %#08x\n", i, community->features); in intel_pinctrl_probe()
1578 community->regs = regs; in intel_pinctrl_probe()
1579 community->pad_regs = regs + offset; in intel_pinctrl_probe()
1581 if (community->gpps) in intel_pinctrl_probe()
1582 ret = intel_pinctrl_add_padgroups_by_gpps(pctrl, community); in intel_pinctrl_probe()
1584 ret = intel_pinctrl_add_padgroups_by_size(pctrl, community); in intel_pinctrl_probe()
1722 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend_noirq() local
1726 base = community->regs + community->ie_offset; in intel_pinctrl_suspend_noirq()
1727 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1730 base = community->regs + community->hostown_offset; in intel_pinctrl_suspend_noirq()
1731 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend_noirq()
1756 const struct intel_community *community = &pctrl->communities[c]; in intel_restore_hostown() local
1757 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_restore_hostown()
1828 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume_noirq() local
1832 base = community->regs + community->ie_offset; in intel_pinctrl_resume_noirq()
1833 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()
1836 base = community->regs + community->hostown_offset; in intel_pinctrl_resume_noirq()
1837 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_resume_noirq()