Lines Matching refs:community

120 	struct intel_community *community;  in intel_get_community()  local
124 community = &pctrl->communities[i]; in intel_get_community()
125 if (pin >= community->pin_base && in intel_get_community()
126 pin < community->pin_base + community->npins) in intel_get_community()
127 return community; in intel_get_community()
135 intel_community_get_padgroup(const struct intel_community *community, in intel_community_get_padgroup() argument
140 for (i = 0; i < community->ngpps; i++) { in intel_community_get_padgroup()
141 const struct intel_padgroup *padgrp = &community->gpps[i]; in intel_community_get_padgroup()
153 const struct intel_community *community; in intel_get_padcfg() local
157 community = intel_get_community(pctrl, pin); in intel_get_padcfg()
158 if (!community) in intel_get_padcfg()
161 padno = pin_to_padno(community, pin); in intel_get_padcfg()
162 nregs = (community->features & PINCTRL_FEATURE_DEBOUNCE) ? 4 : 2; in intel_get_padcfg()
164 if (reg == PADCFG2 && !(community->features & PINCTRL_FEATURE_DEBOUNCE)) in intel_get_padcfg()
167 return community->pad_regs + reg + padno * nregs * 4; in intel_get_padcfg()
172 const struct intel_community *community; in intel_pad_owned_by_host() local
177 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host()
178 if (!community) in intel_pad_owned_by_host()
180 if (!community->padown_offset) in intel_pad_owned_by_host()
183 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_owned_by_host()
189 offset = community->padown_offset + padgrp->padown_num * 4 + gpp * 4; in intel_pad_owned_by_host()
190 padown = community->regs + offset; in intel_pad_owned_by_host()
197 const struct intel_community *community; in intel_pad_acpi_mode() local
202 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode()
203 if (!community) in intel_pad_acpi_mode()
205 if (!community->hostown_offset) in intel_pad_acpi_mode()
208 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_acpi_mode()
213 offset = community->hostown_offset + padgrp->reg_num * 4; in intel_pad_acpi_mode()
214 hostown = community->regs + offset; in intel_pad_acpi_mode()
221 struct intel_community *community; in intel_pad_locked() local
226 community = intel_get_community(pctrl, pin); in intel_pad_locked()
227 if (!community) in intel_pad_locked()
229 if (!community->padcfglock_offset) in intel_pad_locked()
232 padgrp = intel_community_get_padgroup(community, pin); in intel_pad_locked()
243 offset = community->padcfglock_offset + padgrp->reg_num * 8; in intel_pad_locked()
244 value = readl(community->regs + offset); in intel_pad_locked()
248 offset = community->padcfglock_offset + 4 + padgrp->reg_num * 8; in intel_pad_locked()
249 value = readl(community->regs + offset); in intel_pad_locked()
494 const struct intel_community *community; in intel_config_get() local
501 community = intel_get_community(pctrl, pin); in intel_config_get()
538 if (!(community->features & PINCTRL_FEATURE_1K_PD)) in intel_config_get()
583 const struct intel_community *community; in intel_config_set_pull() local
591 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
635 if (!(community->features & PINCTRL_FEATURE_1K_PD)) { in intel_config_set_pull()
762 const struct intel_community **community, in intel_gpio_to_pin() argument
782 if (community) in intel_gpio_to_pin()
783 *community = comm; in intel_gpio_to_pin()
894 const struct intel_community *community; in intel_gpio_irq_ack() local
898 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
904 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_ack()
907 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_ack()
916 const struct intel_community *community; in intel_gpio_irq_enable() local
920 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_enable()
928 is_offset = community->is_offset + gpp * 4; in intel_gpio_irq_enable()
932 writel(BIT(gpp_offset), community->regs + is_offset); in intel_gpio_irq_enable()
934 value = readl(community->regs + community->ie_offset + gpp * 4); in intel_gpio_irq_enable()
936 writel(value, community->regs + community->ie_offset + gpp * 4); in intel_gpio_irq_enable()
945 const struct intel_community *community; in intel_gpio_irq_mask_unmask() local
949 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_mask_unmask()
959 reg = community->regs + community->ie_offset + gpp * 4; in intel_gpio_irq_mask_unmask()
1055 const struct intel_community *community) in intel_gpio_community_irq_handler() argument
1061 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_community_irq_handler()
1062 const struct intel_padgroup *padgrp = &community->gpps[gpp]; in intel_gpio_community_irq_handler()
1065 pending = readl(community->regs + community->is_offset + in intel_gpio_community_irq_handler()
1067 enabled = readl(community->regs + community->ie_offset + in intel_gpio_community_irq_handler()
1089 const struct intel_community *community; in intel_gpio_irq() local
1096 community = &pctrl->communities[i]; in intel_gpio_irq()
1097 ret |= intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1115 const struct intel_community *community) in intel_gpio_add_pin_ranges() argument
1119 for (i = 0; i < community->ngpps; i++) { in intel_gpio_add_pin_ranges()
1120 const struct intel_padgroup *gpp = &community->gpps[i]; in intel_gpio_add_pin_ranges()
1137 const struct intel_community *community; in intel_gpio_ngpio() local
1142 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1143 for (j = 0; j < community->ngpps; j++) { in intel_gpio_ngpio()
1144 const struct intel_padgroup *gpp = &community->gpps[j]; in intel_gpio_ngpio()
1176 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_probe() local
1178 ret = intel_gpio_add_pin_ranges(pctrl, community); in intel_gpio_probe()
1211 struct intel_community *community) in intel_pinctrl_add_padgroups() argument
1214 unsigned npins = community->npins; in intel_pinctrl_add_padgroups()
1218 if (community->gpps) in intel_pinctrl_add_padgroups()
1219 ngpps = community->ngpps; in intel_pinctrl_add_padgroups()
1221 ngpps = DIV_ROUND_UP(community->npins, community->gpp_size); in intel_pinctrl_add_padgroups()
1228 if (community->gpps) { in intel_pinctrl_add_padgroups()
1229 gpps[i] = community->gpps[i]; in intel_pinctrl_add_padgroups()
1231 unsigned gpp_size = community->gpp_size; in intel_pinctrl_add_padgroups()
1234 gpps[i].base = community->pin_base + i * gpp_size; in intel_pinctrl_add_padgroups()
1251 if (community->gpp_num_padown_regs) in intel_pinctrl_add_padgroups()
1252 padown_num += community->gpp_num_padown_regs; in intel_pinctrl_add_padgroups()
1257 community->ngpps = ngpps; in intel_pinctrl_add_padgroups()
1258 community->gpps = gpps; in intel_pinctrl_add_padgroups()
1282 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init() local
1285 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1328 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe() local
1333 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1336 community->barno); in intel_pinctrl_probe()
1345 if (!community->features) { in intel_pinctrl_probe()
1350 community->features |= PINCTRL_FEATURE_DEBOUNCE; in intel_pinctrl_probe()
1351 community->features |= PINCTRL_FEATURE_1K_PD; in intel_pinctrl_probe()
1358 community->regs = regs; in intel_pinctrl_probe()
1359 community->pad_regs = regs + padbar; in intel_pinctrl_probe()
1361 if (!community->is_offset) in intel_pinctrl_probe()
1362 community->is_offset = GPI_IS; in intel_pinctrl_probe()
1364 ret = intel_pinctrl_add_padgroups(pctrl, community); in intel_pinctrl_probe()
1451 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend() local
1455 base = community->regs + community->ie_offset; in intel_pinctrl_suspend()
1456 for (gpp = 0; gpp < community->ngpps; gpp++) in intel_pinctrl_suspend()
1469 const struct intel_community *community; in intel_gpio_irq_init() local
1473 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1474 base = community->regs; in intel_gpio_irq_init()
1476 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_gpio_irq_init()
1478 writel(0, base + community->ie_offset + gpp * 4); in intel_gpio_irq_init()
1479 writel(0xffff, base + community->is_offset + gpp * 4); in intel_gpio_irq_init()
1533 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume() local
1537 base = community->regs + community->ie_offset; in intel_pinctrl_resume()
1538 for (gpp = 0; gpp < community->ngpps; gpp++) { in intel_pinctrl_resume()