Lines Matching refs:at91_chip

935 	struct at91_gpio_chip *at91_chip;  in at91_gpio_request_enable()  local
948 at91_chip = gpiochip_get_data(chip); in at91_gpio_request_enable()
957 writel_relaxed(mask, at91_chip->regbase + PIO_PER); in at91_gpio_request_enable()
1658 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); in at91_gpio_suspend() local
1659 void __iomem *pio = at91_chip->regbase; in at91_gpio_suspend()
1661 at91_chip->backups = readl_relaxed(pio + PIO_IMR); in at91_gpio_suspend()
1662 writel_relaxed(at91_chip->backups, pio + PIO_IDR); in at91_gpio_suspend()
1663 writel_relaxed(at91_chip->wakeups, pio + PIO_IER); in at91_gpio_suspend()
1665 if (!at91_chip->wakeups) in at91_gpio_suspend()
1666 clk_disable_unprepare(at91_chip->clock); in at91_gpio_suspend()
1669 'A' + at91_chip->id, at91_chip->wakeups); in at91_gpio_suspend()
1676 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); in at91_gpio_resume() local
1677 void __iomem *pio = at91_chip->regbase; in at91_gpio_resume()
1679 if (!at91_chip->wakeups) in at91_gpio_resume()
1680 clk_prepare_enable(at91_chip->clock); in at91_gpio_resume()
1682 writel_relaxed(at91_chip->wakeups, pio + PIO_IDR); in at91_gpio_resume()
1683 writel_relaxed(at91_chip->backups, pio + PIO_IER); in at91_gpio_resume()
1819 struct at91_gpio_chip *at91_chip = NULL; in at91_gpio_probe() local
1836 at91_chip = devm_kzalloc(dev, sizeof(*at91_chip), GFP_KERNEL); in at91_gpio_probe()
1837 if (!at91_chip) in at91_gpio_probe()
1840 at91_chip->regbase = devm_platform_ioremap_resource(pdev, 0); in at91_gpio_probe()
1841 if (IS_ERR(at91_chip->regbase)) in at91_gpio_probe()
1842 return PTR_ERR(at91_chip->regbase); in at91_gpio_probe()
1844 at91_chip->ops = device_get_match_data(dev); in at91_gpio_probe()
1845 at91_chip->pioc_virq = irq; in at91_gpio_probe()
1847 at91_chip->clock = devm_clk_get_enabled(dev, NULL); in at91_gpio_probe()
1848 if (IS_ERR(at91_chip->clock)) in at91_gpio_probe()
1849 return dev_err_probe(dev, PTR_ERR(at91_chip->clock), "failed to get clock, ignoring.\n"); in at91_gpio_probe()
1851 at91_chip->chip = at91_gpio_template; in at91_gpio_probe()
1852 at91_chip->id = alias_idx; in at91_gpio_probe()
1854 chip = &at91_chip->chip; in at91_gpio_probe()
1877 range = &at91_chip->range; in at91_gpio_probe()
1885 ret = at91_gpio_of_irq_setup(pdev, at91_chip); in at91_gpio_probe()
1889 ret = gpiochip_add_data(chip, at91_chip); in at91_gpio_probe()
1893 gpio_chips[alias_idx] = at91_chip; in at91_gpio_probe()
1894 platform_set_drvdata(pdev, at91_chip); in at91_gpio_probe()
1897 dev_info(dev, "at address %p\n", at91_chip->regbase); in at91_gpio_probe()