Lines Matching refs:at91_chip

936 	struct at91_gpio_chip *at91_chip;
949 at91_chip = gpiochip_get_data(chip);
958 writel_relaxed(mask, at91_chip->regbase + PIO_PER);
1662 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev);
1663 void __iomem *pio = at91_chip->regbase;
1665 at91_chip->backups = readl_relaxed(pio + PIO_IMR);
1666 writel_relaxed(at91_chip->backups, pio + PIO_IDR);
1667 writel_relaxed(at91_chip->wakeups, pio + PIO_IER);
1669 if (!at91_chip->wakeups)
1670 clk_disable_unprepare(at91_chip->clock);
1673 'A' + at91_chip->id, at91_chip->wakeups);
1680 struct at91_gpio_chip *at91_chip = dev_get_drvdata(dev);
1681 void __iomem *pio = at91_chip->regbase;
1683 if (!at91_chip->wakeups)
1684 clk_prepare_enable(at91_chip->clock);
1686 writel_relaxed(at91_chip->wakeups, pio + PIO_IDR);
1687 writel_relaxed(at91_chip->backups, pio + PIO_IER);
1823 struct at91_gpio_chip *at91_chip = NULL;
1840 at91_chip = devm_kzalloc(dev, sizeof(*at91_chip), GFP_KERNEL);
1841 if (!at91_chip)
1844 at91_chip->regbase = devm_platform_ioremap_resource(pdev, 0);
1845 if (IS_ERR(at91_chip->regbase))
1846 return PTR_ERR(at91_chip->regbase);
1848 at91_chip->ops = of_device_get_match_data(dev);
1849 at91_chip->pioc_virq = irq;
1851 at91_chip->clock = devm_clk_get_enabled(dev, NULL);
1852 if (IS_ERR(at91_chip->clock))
1853 return dev_err_probe(dev, PTR_ERR(at91_chip->clock), "failed to get clock, ignoring.\n");
1855 at91_chip->chip = at91_gpio_template;
1856 at91_chip->id = alias_idx;
1858 chip = &at91_chip->chip;
1881 range = &at91_chip->range;
1889 ret = at91_gpio_of_irq_setup(pdev, at91_chip);
1893 ret = gpiochip_add_data(chip, at91_chip);
1897 gpio_chips[alias_idx] = at91_chip;
1898 platform_set_drvdata(pdev, at91_chip);
1901 dev_info(dev, "at address %p\n", at91_chip->regbase);