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()
1652 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); in at91_gpio_suspend() local
1653 void __iomem *pio = at91_chip->regbase; in at91_gpio_suspend()
1655 at91_chip->backups = readl_relaxed(pio + PIO_IMR); in at91_gpio_suspend()
1656 writel_relaxed(at91_chip->backups, pio + PIO_IDR); in at91_gpio_suspend()
1657 writel_relaxed(at91_chip->wakeups, pio + PIO_IER); in at91_gpio_suspend()
1659 if (!at91_chip->wakeups) in at91_gpio_suspend()
1660 clk_disable_unprepare(at91_chip->clock); in at91_gpio_suspend()
1663 'A' + at91_chip->id, at91_chip->wakeups); in at91_gpio_suspend()
1670 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev); in at91_gpio_resume() local
1671 void __iomem *pio = at91_chip->regbase; in at91_gpio_resume()
1673 if (!at91_chip->wakeups) in at91_gpio_resume()
1674 clk_prepare_enable(at91_chip->clock); in at91_gpio_resume()
1676 writel_relaxed(at91_chip->wakeups, pio + PIO_IDR); in at91_gpio_resume()
1677 writel_relaxed(at91_chip->backups, pio + PIO_IER); in at91_gpio_resume()
1809 struct at91_gpio_chip *at91_chip = NULL; in at91_gpio_probe() local
1830 at91_chip = devm_kzalloc(&pdev->dev, sizeof(*at91_chip), GFP_KERNEL); in at91_gpio_probe()
1831 if (!at91_chip) { in at91_gpio_probe()
1836 at91_chip->regbase = devm_platform_ioremap_resource(pdev, 0); in at91_gpio_probe()
1837 if (IS_ERR(at91_chip->regbase)) { in at91_gpio_probe()
1838 ret = PTR_ERR(at91_chip->regbase); in at91_gpio_probe()
1842 at91_chip->ops = (const struct at91_pinctrl_mux_ops *) in at91_gpio_probe()
1844 at91_chip->pioc_virq = irq; in at91_gpio_probe()
1845 at91_chip->pioc_idx = alias_idx; in at91_gpio_probe()
1847 at91_chip->clock = devm_clk_get(&pdev->dev, NULL); in at91_gpio_probe()
1848 if (IS_ERR(at91_chip->clock)) { in at91_gpio_probe()
1850 ret = PTR_ERR(at91_chip->clock); in at91_gpio_probe()
1854 ret = clk_prepare_enable(at91_chip->clock); in at91_gpio_probe()
1860 at91_chip->chip = at91_gpio_template; in at91_gpio_probe()
1861 at91_chip->id = alias_idx; in at91_gpio_probe()
1863 chip = &at91_chip->chip; in at91_gpio_probe()
1890 range = &at91_chip->range; in at91_gpio_probe()
1898 ret = at91_gpio_of_irq_setup(pdev, at91_chip); in at91_gpio_probe()
1902 ret = gpiochip_add_data(chip, at91_chip); in at91_gpio_probe()
1906 gpio_chips[alias_idx] = at91_chip; in at91_gpio_probe()
1907 platform_set_drvdata(pdev, at91_chip); in at91_gpio_probe()
1910 dev_info(&pdev->dev, "at address %p\n", at91_chip->regbase); in at91_gpio_probe()
1916 clk_disable_unprepare(at91_chip->clock); in at91_gpio_probe()