Lines Matching defs:community

112 	struct intel_community *community;
116 community = &pctrl->communities[i];
117 if (pin >= community->pin_base &&
118 pin < community->pin_base + community->npins)
119 return community;
122 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin);
128 intel_community_get_padgroup(const struct intel_community *community,
133 for (i = 0; i < community->ngpps; i++) {
134 const struct intel_padgroup *padgrp = &community->gpps[i];
146 const struct intel_community *community;
150 community = intel_get_community(pctrl, pin);
151 if (!community)
154 padno = pin_to_padno(community, pin);
155 nregs = (community->features & PINCTRL_FEATURE_DEBOUNCE) ? 4 : 2;
160 return community->pad_regs + reg + padno * nregs * 4;
165 const struct intel_community *community;
170 community = intel_get_community(pctrl, pin);
171 if (!community)
173 if (!community->padown_offset)
176 padgrp = intel_community_get_padgroup(community, pin);
182 offset = community->padown_offset + padgrp->padown_num * 4 + gpp * 4;
183 padown = community->regs + offset;
190 const struct intel_community *community;
195 community = intel_get_community(pctrl, pin);
196 if (!community)
198 if (!community->hostown_offset)
201 padgrp = intel_community_get_padgroup(community, pin);
206 offset = community->hostown_offset + padgrp->reg_num * 4;
207 hostown = community->regs + offset;
233 struct intel_community *community;
239 community = intel_get_community(pctrl, pin);
240 if (!community)
242 if (!community->padcfglock_offset)
245 padgrp = intel_community_get_padgroup(community, pin);
256 offset = community->padcfglock_offset + 0 + padgrp->reg_num * 8;
257 value = readl(community->regs + offset);
261 offset = community->padcfglock_offset + 4 + padgrp->reg_num * 8;
262 value = readl(community->regs + offset);
551 const struct intel_community *community;
556 community = intel_get_community(pctrl, pin);
601 if (!(community->features & PINCTRL_FEATURE_1K_PD))
606 if (!(community->features & PINCTRL_FEATURE_1K_PD))
693 const struct intel_community *community;
699 community = intel_get_community(pctrl, pin);
752 if (!(community->features & PINCTRL_FEATURE_1K_PD)) {
759 if (!(community->features & PINCTRL_FEATURE_1K_PD)) {
881 * @community: Community is filled here if not %NULL
888 * Return: a pin number and pointers to the community and pad group, which
892 const struct intel_community **community,
912 if (community)
913 *community = comm;
936 const struct intel_community *community;
939 community = intel_get_community(pctrl, pin);
940 if (!community)
943 padgrp = intel_community_get_padgroup(community, pin);
1055 const struct intel_community *community;
1059 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp);
1065 is_offset = community->is_offset + gpp * 4;
1068 writel(BIT(gpp_offset), community->regs + is_offset);
1076 const struct intel_community *community;
1080 pin = intel_gpio_to_pin(pctrl, hwirq, &community, &padgrp);
1090 reg = community->regs + community->ie_offset + gpp * 4;
1091 is = community->regs + community->is_offset + gpp * 4;
1214 const struct intel_community *community)
1220 for (gpp = 0; gpp < community->ngpps; gpp++) {
1221 const struct intel_padgroup *padgrp = &community->gpps[gpp];
1226 pending = readl(community->regs + community->is_offset +
1228 enabled = readl(community->regs + community->ie_offset +
1247 const struct intel_community *community;
1254 community = &pctrl->communities[i];
1255 ret += intel_gpio_community_irq_handler(pctrl, community);
1266 const struct intel_community *community;
1270 community = &pctrl->communities[i];
1271 base = community->regs;
1273 for (gpp = 0; gpp < community->ngpps; gpp++) {
1275 writel(0, base + community->ie_offset + gpp * 4);
1276 writel(0xffff, base + community->is_offset + gpp * 4);
1295 const struct intel_community *community)
1299 for (i = 0; i < community->ngpps; i++) {
1300 const struct intel_padgroup *gpp = &community->gpps[i];
1321 struct intel_community *community = &pctrl->communities[i];
1323 ret = intel_gpio_add_community_ranges(pctrl, community);
1335 const struct intel_community *community;
1340 community = &pctrl->communities[i];
1341 for (j = 0; j < community->ngpps; j++) {
1342 const struct intel_padgroup *gpp = &community->gpps[j];
1402 struct intel_community *community)
1406 size_t i, ngpps = community->ngpps;
1413 gpps[i] = community->gpps[i];
1436 community->gpps = gpps;
1442 struct intel_community *community)
1445 unsigned int npins = community->npins;
1447 size_t i, ngpps = DIV_ROUND_UP(npins, community->gpp_size);
1449 if (community->gpp_size > INTEL_PINCTRL_MAX_GPP_SIZE)
1457 unsigned int gpp_size = community->gpp_size;
1460 gpps[i].base = community->pin_base + i * gpp_size;
1467 padown_num += community->gpp_num_padown_regs;
1470 community->ngpps = ngpps;
1471 community->gpps = gpps;
1495 struct intel_community *community = &pctrl->communities[i];
1498 intmask = devm_kcalloc(pctrl->dev, community->ngpps,
1505 hostown = devm_kcalloc(pctrl->dev, community->ngpps,
1521 struct intel_community *community)
1531 if (!(community->features & PINCTRL_FEATURE_PWM))
1537 pwm = devm_pwm_lpss_probe(pctrl->dev, community->regs + PWMC, &info);
1567 struct intel_community *community = &pctrl->communities[i];
1572 *community = pctrl->soc->communities[i];
1574 regs = devm_platform_ioremap_resource(pdev, community->barno);
1579 * Determine community features based on the revision.
1586 community->features |= PINCTRL_FEATURE_DEBOUNCE;
1587 community->features |= PINCTRL_FEATURE_1K_PD;
1590 /* Determine community features based on the capabilities */
1596 community->features |= PINCTRL_FEATURE_GPIO_HW_INFO;
1599 community->features |= PINCTRL_FEATURE_PWM;
1602 community->features |= PINCTRL_FEATURE_BLINK;
1605 community->features |= PINCTRL_FEATURE_EXP;
1613 dev_dbg(dev, "Community%d features: %#08x\n", i, community->features);
1618 community->regs = regs;
1619 community->pad_regs = regs + offset;
1621 if (community->gpps)
1622 ret = intel_pinctrl_add_padgroups_by_gpps(pctrl, community);
1624 ret = intel_pinctrl_add_padgroups_by_size(pctrl, community);
1628 ret = intel_pinctrl_probe_pwm(pctrl, community);
1791 struct intel_community *community = &pctrl->communities[i];
1795 base = community->regs + community->ie_offset;
1796 for (gpp = 0; gpp < community->ngpps; gpp++)
1799 base = community->regs + community->hostown_offset;
1800 for (gpp = 0; gpp < community->ngpps; gpp++)
1825 const struct intel_community *community = &pctrl->communities[c];
1826 const struct intel_padgroup *padgrp = &community->gpps[gpp];
1902 struct intel_community *community = &pctrl->communities[i];
1906 base = community->regs + community->ie_offset;
1907 for (gpp = 0; gpp < community->ngpps; gpp++)
1910 base = community->regs + community->hostown_offset;
1911 for (gpp = 0; gpp < community->ngpps; gpp++)