Lines Matching defs:community

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