Lines Matching refs:pctrl
101 static struct intel_community *intel_get_community(struct intel_pinctrl *pctrl, in intel_get_community() argument
107 for (i = 0; i < pctrl->ncommunities; i++) { in intel_get_community()
108 community = &pctrl->communities[i]; in intel_get_community()
114 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community()
134 static void __iomem *intel_get_padcfg(struct intel_pinctrl *pctrl, in intel_get_padcfg() argument
141 community = intel_get_community(pctrl, pin); in intel_get_padcfg()
154 static bool intel_pad_owned_by_host(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_owned_by_host() argument
161 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host()
179 static bool intel_pad_acpi_mode(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_acpi_mode() argument
186 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode()
222 static int intel_pad_locked(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_locked() argument
230 community = intel_get_community(pctrl, pin); in intel_pad_locked()
260 static bool intel_pad_is_unlocked(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_is_unlocked() argument
262 return (intel_pad_locked(pctrl, pin) & PAD_LOCKED) == PAD_UNLOCKED; in intel_pad_is_unlocked()
265 static bool intel_pad_usable(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_usable() argument
267 return intel_pad_owned_by_host(pctrl, pin) && intel_pad_is_unlocked(pctrl, pin); in intel_pad_usable()
272 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_groups_count() local
274 return pctrl->soc->ngroups; in intel_get_groups_count()
280 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_group_name() local
282 return pctrl->soc->groups[group].name; in intel_get_group_name()
288 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_group_pins() local
290 *pins = pctrl->soc->groups[group].pins; in intel_get_group_pins()
291 *npins = pctrl->soc->groups[group].npins; in intel_get_group_pins()
298 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_pin_dbg_show() local
304 if (!intel_pad_owned_by_host(pctrl, pin)) { in intel_pin_dbg_show()
309 cfg0 = readl(intel_get_padcfg(pctrl, pin, PADCFG0)); in intel_pin_dbg_show()
310 cfg1 = readl(intel_get_padcfg(pctrl, pin, PADCFG1)); in intel_pin_dbg_show()
321 padcfg = intel_get_padcfg(pctrl, pin, PADCFG2); in intel_pin_dbg_show()
325 locked = intel_pad_locked(pctrl, pin); in intel_pin_dbg_show()
326 acpi = intel_pad_acpi_mode(pctrl, pin); in intel_pin_dbg_show()
355 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_functions_count() local
357 return pctrl->soc->nfunctions; in intel_get_functions_count()
363 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_function_name() local
365 return pctrl->soc->functions[function].name; in intel_get_function_name()
373 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_get_function_groups() local
375 *groups = pctrl->soc->functions[function].groups; in intel_get_function_groups()
376 *ngroups = pctrl->soc->functions[function].ngroups; in intel_get_function_groups()
383 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_pinmux_set_mux() local
384 const struct intel_pingroup *grp = &pctrl->soc->groups[group]; in intel_pinmux_set_mux()
388 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_pinmux_set_mux()
395 if (!intel_pad_usable(pctrl, grp->pins[i])) { in intel_pinmux_set_mux()
396 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_pinmux_set_mux()
406 padcfg0 = intel_get_padcfg(pctrl, grp->pins[i], PADCFG0); in intel_pinmux_set_mux()
419 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_pinmux_set_mux()
474 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_gpio_request_enable() local
478 padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_request_enable()
480 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_request_enable()
482 if (!intel_pad_owned_by_host(pctrl, pin)) { in intel_gpio_request_enable()
483 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_request_enable()
487 if (!intel_pad_is_unlocked(pctrl, pin)) { in intel_gpio_request_enable()
488 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_request_enable()
499 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_request_enable()
505 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_request_enable()
514 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_gpio_set_direction() local
518 padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_set_direction()
520 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_set_direction()
522 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_set_direction()
536 static int intel_config_get_pull(struct intel_pinctrl *pctrl, unsigned int pin, in intel_config_get_pull() argument
544 community = intel_get_community(pctrl, pin); in intel_config_get_pull()
545 padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1); in intel_config_get_pull()
547 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_config_get_pull()
549 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_config_get_pull()
612 static int intel_config_get_debounce(struct intel_pinctrl *pctrl, unsigned int pin, in intel_config_get_debounce() argument
620 padcfg2 = intel_get_padcfg(pctrl, pin, PADCFG2); in intel_config_get_debounce()
624 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_config_get_debounce()
626 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_config_get_debounce()
639 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_config_get() local
644 if (!intel_pad_owned_by_host(pctrl, pin)) in intel_config_get()
651 ret = intel_config_get_pull(pctrl, pin, param, &arg); in intel_config_get()
657 ret = intel_config_get_debounce(pctrl, pin, param, &arg); in intel_config_get()
670 static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned int pin, in intel_config_set_pull() argument
681 community = intel_get_community(pctrl, pin); in intel_config_set_pull()
682 padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1); in intel_config_set_pull()
684 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_config_set_pull()
759 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_config_set_pull()
764 static int intel_config_set_debounce(struct intel_pinctrl *pctrl, in intel_config_set_debounce() argument
771 padcfg2 = intel_get_padcfg(pctrl, pin, PADCFG2); in intel_config_set_debounce()
775 padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_config_set_debounce()
777 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_config_set_debounce()
791 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_config_set_debounce()
804 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_config_set_debounce()
812 struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in intel_config_set() local
815 if (!intel_pad_usable(pctrl, pin)) in intel_config_set()
823 ret = intel_config_set_pull(pctrl, pin, configs[i]); in intel_config_set()
829 ret = intel_config_set_debounce(pctrl, pin, in intel_config_set()
867 static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned int offset, in intel_gpio_to_pin() argument
873 for (i = 0; i < pctrl->ncommunities; i++) { in intel_gpio_to_pin()
874 const struct intel_community *comm = &pctrl->communities[i]; in intel_gpio_to_pin()
908 static __maybe_unused int intel_pin_to_gpio(struct intel_pinctrl *pctrl, int pin) in intel_pin_to_gpio() argument
913 community = intel_get_community(pctrl, pin); in intel_pin_to_gpio()
926 struct intel_pinctrl *pctrl = gpiochip_get_data(chip); in intel_gpio_get() local
931 pin = intel_gpio_to_pin(pctrl, offset, NULL, NULL); in intel_gpio_get()
935 reg = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_get()
949 struct intel_pinctrl *pctrl = gpiochip_get_data(chip); in intel_gpio_set() local
955 pin = intel_gpio_to_pin(pctrl, offset, NULL, NULL); in intel_gpio_set()
959 reg = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_set()
963 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_set()
970 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_set()
975 struct intel_pinctrl *pctrl = gpiochip_get_data(chip); in intel_gpio_get_direction() local
981 pin = intel_gpio_to_pin(pctrl, offset, NULL, NULL); in intel_gpio_get_direction()
985 reg = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_get_direction()
989 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_get_direction()
991 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_get_direction()
1028 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_irq_ack() local
1033 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_ack()
1041 raw_spin_lock(&pctrl->lock); in intel_gpio_irq_ack()
1043 raw_spin_unlock(&pctrl->lock); in intel_gpio_irq_ack()
1050 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_irq_mask_unmask() local
1055 pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), &community, &padgrp); in intel_gpio_irq_mask_unmask()
1068 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_irq_mask_unmask()
1079 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_irq_mask_unmask()
1096 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_irq_type() local
1097 unsigned int pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL); in intel_gpio_irq_type()
1102 reg = intel_get_padcfg(pctrl, pin, PADCFG0); in intel_gpio_irq_type()
1111 if (intel_pad_acpi_mode(pctrl, pin)) { in intel_gpio_irq_type()
1112 dev_warn(pctrl->dev, "pin %u cannot be used as IRQ\n", pin); in intel_gpio_irq_type()
1116 raw_spin_lock_irqsave(&pctrl->lock, flags); in intel_gpio_irq_type()
1145 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in intel_gpio_irq_type()
1153 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_irq_wake() local
1154 unsigned int pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL); in intel_gpio_irq_wake()
1157 enable_irq_wake(pctrl->irq); in intel_gpio_irq_wake()
1159 disable_irq_wake(pctrl->irq); in intel_gpio_irq_wake()
1161 dev_dbg(pctrl->dev, "%sable wake for pin %u\n", on ? "en" : "dis", pin); in intel_gpio_irq_wake()
1165 static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl, in intel_gpio_community_irq_handler() argument
1168 struct gpio_chip *gc = &pctrl->chip; in intel_gpio_community_irq_handler()
1176 raw_spin_lock(&pctrl->lock); in intel_gpio_community_irq_handler()
1183 raw_spin_unlock(&pctrl->lock); in intel_gpio_community_irq_handler()
1205 struct intel_pinctrl *pctrl = data; in intel_gpio_irq() local
1210 for (i = 0; i < pctrl->ncommunities; i++) { in intel_gpio_irq()
1211 community = &pctrl->communities[i]; in intel_gpio_irq()
1212 ret += intel_gpio_community_irq_handler(pctrl, community); in intel_gpio_irq()
1218 static void intel_gpio_irq_init(struct intel_pinctrl *pctrl) in intel_gpio_irq_init() argument
1222 for (i = 0; i < pctrl->ncommunities; i++) { in intel_gpio_irq_init()
1227 community = &pctrl->communities[i]; in intel_gpio_irq_init()
1240 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_irq_init_hw() local
1246 intel_gpio_irq_init(pctrl); in intel_gpio_irq_init_hw()
1251 static int intel_gpio_add_community_ranges(struct intel_pinctrl *pctrl, in intel_gpio_add_community_ranges() argument
1262 ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), in intel_gpio_add_community_ranges()
1274 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); in intel_gpio_add_pin_ranges() local
1277 for (i = 0; i < pctrl->ncommunities; i++) { in intel_gpio_add_pin_ranges()
1278 struct intel_community *community = &pctrl->communities[i]; in intel_gpio_add_pin_ranges()
1280 ret = intel_gpio_add_community_ranges(pctrl, community); in intel_gpio_add_pin_ranges()
1282 dev_err(pctrl->dev, "failed to add GPIO pin range\n"); in intel_gpio_add_pin_ranges()
1290 static unsigned int intel_gpio_ngpio(const struct intel_pinctrl *pctrl) in intel_gpio_ngpio() argument
1296 for (i = 0; i < pctrl->ncommunities; i++) { in intel_gpio_ngpio()
1297 community = &pctrl->communities[i]; in intel_gpio_ngpio()
1312 static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq) in intel_gpio_probe() argument
1317 pctrl->chip = intel_gpio_chip; in intel_gpio_probe()
1320 pctrl->chip.ngpio = intel_gpio_ngpio(pctrl); in intel_gpio_probe()
1321 pctrl->chip.label = dev_name(pctrl->dev); in intel_gpio_probe()
1322 pctrl->chip.parent = pctrl->dev; in intel_gpio_probe()
1323 pctrl->chip.base = -1; in intel_gpio_probe()
1324 pctrl->chip.add_pin_ranges = intel_gpio_add_pin_ranges; in intel_gpio_probe()
1325 pctrl->irq = irq; in intel_gpio_probe()
1328 pctrl->irqchip.name = dev_name(pctrl->dev); in intel_gpio_probe()
1329 pctrl->irqchip.irq_ack = intel_gpio_irq_ack; in intel_gpio_probe()
1330 pctrl->irqchip.irq_mask = intel_gpio_irq_mask; in intel_gpio_probe()
1331 pctrl->irqchip.irq_unmask = intel_gpio_irq_unmask; in intel_gpio_probe()
1332 pctrl->irqchip.irq_set_type = intel_gpio_irq_type; in intel_gpio_probe()
1333 pctrl->irqchip.irq_set_wake = intel_gpio_irq_wake; in intel_gpio_probe()
1334 pctrl->irqchip.flags = IRQCHIP_MASK_ON_SUSPEND; in intel_gpio_probe()
1340 ret = devm_request_irq(pctrl->dev, irq, intel_gpio_irq, in intel_gpio_probe()
1342 dev_name(pctrl->dev), pctrl); in intel_gpio_probe()
1344 dev_err(pctrl->dev, "failed to request interrupt\n"); in intel_gpio_probe()
1348 girq = &pctrl->chip.irq; in intel_gpio_probe()
1349 girq->chip = &pctrl->irqchip; in intel_gpio_probe()
1357 ret = devm_gpiochip_add_data(pctrl->dev, &pctrl->chip, pctrl); in intel_gpio_probe()
1359 dev_err(pctrl->dev, "failed to register gpiochip\n"); in intel_gpio_probe()
1366 static int intel_pinctrl_add_padgroups_by_gpps(struct intel_pinctrl *pctrl, in intel_pinctrl_add_padgroups_by_gpps() argument
1373 gpps = devm_kcalloc(pctrl->dev, ngpps, sizeof(*gpps), GFP_KERNEL); in intel_pinctrl_add_padgroups_by_gpps()
1406 static int intel_pinctrl_add_padgroups_by_size(struct intel_pinctrl *pctrl, in intel_pinctrl_add_padgroups_by_size() argument
1417 gpps = devm_kcalloc(pctrl->dev, ngpps, sizeof(*gpps), GFP_KERNEL); in intel_pinctrl_add_padgroups_by_size()
1448 static int intel_pinctrl_pm_init(struct intel_pinctrl *pctrl) in intel_pinctrl_pm_init() argument
1451 const struct intel_pinctrl_soc_data *soc = pctrl->soc; in intel_pinctrl_pm_init()
1456 pads = devm_kcalloc(pctrl->dev, soc->npins, sizeof(*pads), GFP_KERNEL); in intel_pinctrl_pm_init()
1460 communities = devm_kcalloc(pctrl->dev, pctrl->ncommunities, in intel_pinctrl_pm_init()
1466 for (i = 0; i < pctrl->ncommunities; i++) { in intel_pinctrl_pm_init()
1467 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_pm_init()
1470 intmask = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1477 hostown = devm_kcalloc(pctrl->dev, community->ngpps, in intel_pinctrl_pm_init()
1485 pctrl->context.pads = pads; in intel_pinctrl_pm_init()
1486 pctrl->context.communities = communities; in intel_pinctrl_pm_init()
1495 struct intel_pinctrl *pctrl; in intel_pinctrl_probe() local
1498 pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); in intel_pinctrl_probe()
1499 if (!pctrl) in intel_pinctrl_probe()
1502 pctrl->dev = &pdev->dev; in intel_pinctrl_probe()
1503 pctrl->soc = soc_data; in intel_pinctrl_probe()
1504 raw_spin_lock_init(&pctrl->lock); in intel_pinctrl_probe()
1510 pctrl->ncommunities = pctrl->soc->ncommunities; in intel_pinctrl_probe()
1511 pctrl->communities = devm_kcalloc(&pdev->dev, pctrl->ncommunities, in intel_pinctrl_probe()
1512 sizeof(*pctrl->communities), GFP_KERNEL); in intel_pinctrl_probe()
1513 if (!pctrl->communities) in intel_pinctrl_probe()
1516 for (i = 0; i < pctrl->ncommunities; i++) { in intel_pinctrl_probe()
1517 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_probe()
1522 *community = pctrl->soc->communities[i]; in intel_pinctrl_probe()
1572 ret = intel_pinctrl_add_padgroups_by_gpps(pctrl, community); in intel_pinctrl_probe()
1574 ret = intel_pinctrl_add_padgroups_by_size(pctrl, community); in intel_pinctrl_probe()
1583 ret = intel_pinctrl_pm_init(pctrl); in intel_pinctrl_probe()
1587 pctrl->pctldesc = intel_pinctrl_desc; in intel_pinctrl_probe()
1588 pctrl->pctldesc.name = dev_name(&pdev->dev); in intel_pinctrl_probe()
1589 pctrl->pctldesc.pins = pctrl->soc->pins; in intel_pinctrl_probe()
1590 pctrl->pctldesc.npins = pctrl->soc->npins; in intel_pinctrl_probe()
1592 pctrl->pctldev = devm_pinctrl_register(&pdev->dev, &pctrl->pctldesc, in intel_pinctrl_probe()
1593 pctrl); in intel_pinctrl_probe()
1594 if (IS_ERR(pctrl->pctldev)) { in intel_pinctrl_probe()
1596 return PTR_ERR(pctrl->pctldev); in intel_pinctrl_probe()
1599 ret = intel_gpio_probe(pctrl, irq); in intel_pinctrl_probe()
1603 platform_set_drvdata(pdev, pctrl); in intel_pinctrl_probe()
1670 static bool intel_pinctrl_should_save(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pinctrl_should_save() argument
1672 const struct pin_desc *pd = pin_desc_get(pctrl->pctldev, pin); in intel_pinctrl_should_save()
1675 if (!pd || !intel_pad_usable(pctrl, pin)) in intel_pinctrl_should_save()
1685 gpiochip_line_is_irq(&pctrl->chip, intel_pin_to_gpio(pctrl, pin))) in intel_pinctrl_should_save()
1702 value = readl(intel_get_padcfg(pctrl, pin, PADCFG0)); in intel_pinctrl_should_save()
1711 struct intel_pinctrl *pctrl = dev_get_drvdata(dev); in intel_pinctrl_suspend_noirq() local
1716 pads = pctrl->context.pads; in intel_pinctrl_suspend_noirq()
1717 for (i = 0; i < pctrl->soc->npins; i++) { in intel_pinctrl_suspend_noirq()
1718 const struct pinctrl_pin_desc *desc = &pctrl->soc->pins[i]; in intel_pinctrl_suspend_noirq()
1722 if (!intel_pinctrl_should_save(pctrl, desc->number)) in intel_pinctrl_suspend_noirq()
1725 val = readl(intel_get_padcfg(pctrl, desc->number, PADCFG0)); in intel_pinctrl_suspend_noirq()
1727 val = readl(intel_get_padcfg(pctrl, desc->number, PADCFG1)); in intel_pinctrl_suspend_noirq()
1730 padcfg = intel_get_padcfg(pctrl, desc->number, PADCFG2); in intel_pinctrl_suspend_noirq()
1735 communities = pctrl->context.communities; in intel_pinctrl_suspend_noirq()
1736 for (i = 0; i < pctrl->ncommunities; i++) { in intel_pinctrl_suspend_noirq()
1737 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_suspend_noirq()
1768 static void intel_restore_hostown(struct intel_pinctrl *pctrl, unsigned int c, in intel_restore_hostown() argument
1771 const struct intel_community *community = &pctrl->communities[c]; in intel_restore_hostown()
1773 struct device *dev = pctrl->dev; in intel_restore_hostown()
1781 for_each_requested_gpio_in_range(&pctrl->chip, i, padgrp->gpio_base, padgrp->size, dummy) in intel_restore_hostown()
1790 static void intel_restore_intmask(struct intel_pinctrl *pctrl, unsigned int c, in intel_restore_intmask() argument
1793 struct device *dev = pctrl->dev; in intel_restore_intmask()
1801 static void intel_restore_padcfg(struct intel_pinctrl *pctrl, unsigned int pin, in intel_restore_padcfg() argument
1806 struct device *dev = pctrl->dev; in intel_restore_padcfg()
1809 padcfg = intel_get_padcfg(pctrl, pin, reg); in intel_restore_padcfg()
1821 struct intel_pinctrl *pctrl = dev_get_drvdata(dev); in intel_pinctrl_resume_noirq() local
1827 intel_gpio_irq_init(pctrl); in intel_pinctrl_resume_noirq()
1829 pads = pctrl->context.pads; in intel_pinctrl_resume_noirq()
1830 for (i = 0; i < pctrl->soc->npins; i++) { in intel_pinctrl_resume_noirq()
1831 const struct pinctrl_pin_desc *desc = &pctrl->soc->pins[i]; in intel_pinctrl_resume_noirq()
1833 if (!(intel_pinctrl_should_save(pctrl, desc->number) || in intel_pinctrl_resume_noirq()
1841 intel_restore_padcfg(pctrl, desc->number, PADCFG0, pads[i].padcfg0); in intel_pinctrl_resume_noirq()
1842 intel_restore_padcfg(pctrl, desc->number, PADCFG1, pads[i].padcfg1); in intel_pinctrl_resume_noirq()
1843 intel_restore_padcfg(pctrl, desc->number, PADCFG2, pads[i].padcfg2); in intel_pinctrl_resume_noirq()
1846 communities = pctrl->context.communities; in intel_pinctrl_resume_noirq()
1847 for (i = 0; i < pctrl->ncommunities; i++) { in intel_pinctrl_resume_noirq()
1848 struct intel_community *community = &pctrl->communities[i]; in intel_pinctrl_resume_noirq()
1854 intel_restore_intmask(pctrl, i, base, gpp, communities[i].intmask[gpp]); in intel_pinctrl_resume_noirq()
1858 intel_restore_hostown(pctrl, i, base, gpp, communities[i].hostown[gpp]); in intel_pinctrl_resume_noirq()