a7gc             5616 drivers/pinctrl/sirf/pinctrl-atlas7.c atlas7_gpio_bank *atlas7_gpio_to_bank(struct atlas7_gpio_chip *a7gc, u32 gpio)
a7gc             5618 drivers/pinctrl/sirf/pinctrl-atlas7.c 	return &a7gc->banks[GPIO_TO_BANK(gpio)];
a7gc             5621 drivers/pinctrl/sirf/pinctrl-atlas7.c static int __atlas7_gpio_to_pin(struct atlas7_gpio_chip *a7gc, u32 gpio)
a7gc             5626 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, gpio);
a7gc             5637 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(gc);
a7gc             5643 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, d->hwirq);
a7gc             5647 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5653 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5656 drivers/pinctrl/sirf/pinctrl-atlas7.c static void __atlas7_gpio_irq_mask(struct atlas7_gpio_chip *a7gc, int idx)
a7gc             5662 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, idx);
a7gc             5675 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(gc);
a7gc             5678 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5680 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_irq_mask(a7gc, d->hwirq);
a7gc             5682 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5688 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(gc);
a7gc             5694 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, d->hwirq);
a7gc             5698 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5705 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5712 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(gc);
a7gc             5718 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, d->hwirq);
a7gc             5722 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5765 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5781 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(gc);
a7gc             5788 drivers/pinctrl/sirf/pinctrl-atlas7.c 	for (idx = 0; idx < a7gc->nbank; idx++) {
a7gc             5789 drivers/pinctrl/sirf/pinctrl-atlas7.c 		bank = &a7gc->banks[idx];
a7gc             5793 drivers/pinctrl/sirf/pinctrl-atlas7.c 	BUG_ON(idx == a7gc->nbank);
a7gc             5830 drivers/pinctrl/sirf/pinctrl-atlas7.c static void __atlas7_gpio_set_input(struct atlas7_gpio_chip *a7gc,
a7gc             5837 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, gpio);
a7gc             5849 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5853 drivers/pinctrl/sirf/pinctrl-atlas7.c 	ret = __atlas7_gpio_to_pin(a7gc, gpio);
a7gc             5860 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5866 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_set_input(a7gc, gpio);
a7gc             5867 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_irq_mask(a7gc, gpio);
a7gc             5869 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5877 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5880 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5882 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_irq_mask(a7gc, gpio);
a7gc             5883 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_set_input(a7gc, gpio);
a7gc             5885 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5893 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5896 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5898 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_set_input(a7gc, gpio);
a7gc             5900 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5905 drivers/pinctrl/sirf/pinctrl-atlas7.c static void __atlas7_gpio_set_output(struct atlas7_gpio_chip *a7gc,
a7gc             5912 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, gpio);
a7gc             5930 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5933 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5935 drivers/pinctrl/sirf/pinctrl-atlas7.c 	__atlas7_gpio_set_output(a7gc, gpio, value);
a7gc             5937 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5945 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5950 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, gpio);
a7gc             5953 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5957 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5965 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = gpiochip_get_data(chip);
a7gc             5971 drivers/pinctrl/sirf/pinctrl-atlas7.c 	bank = atlas7_gpio_to_bank(a7gc, gpio);
a7gc             5975 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_irqsave(&a7gc->lock, flags);
a7gc             5984 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_unlock_irqrestore(&a7gc->lock, flags);
a7gc             5995 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc;
a7gc             6009 drivers/pinctrl/sirf/pinctrl-atlas7.c 	a7gc = devm_kzalloc(&pdev->dev, struct_size(a7gc, banks, nbank),
a7gc             6011 drivers/pinctrl/sirf/pinctrl-atlas7.c 	if (!a7gc)
a7gc             6015 drivers/pinctrl/sirf/pinctrl-atlas7.c 	a7gc->clk = of_clk_get(np, 0);
a7gc             6016 drivers/pinctrl/sirf/pinctrl-atlas7.c 	if (!IS_ERR(a7gc->clk)) {
a7gc             6017 drivers/pinctrl/sirf/pinctrl-atlas7.c 		ret = clk_prepare_enable(a7gc->clk);
a7gc             6026 drivers/pinctrl/sirf/pinctrl-atlas7.c 	a7gc->reg = of_iomap(np, 0);
a7gc             6027 drivers/pinctrl/sirf/pinctrl-atlas7.c 	if (!a7gc->reg) {
a7gc             6032 drivers/pinctrl/sirf/pinctrl-atlas7.c 	a7gc->nbank = nbank;
a7gc             6033 drivers/pinctrl/sirf/pinctrl-atlas7.c 	raw_spin_lock_init(&a7gc->lock);
a7gc             6036 drivers/pinctrl/sirf/pinctrl-atlas7.c 	chip = &a7gc->chip;
a7gc             6052 drivers/pinctrl/sirf/pinctrl-atlas7.c 	ret = gpiochip_add_data(chip, a7gc);
a7gc             6072 drivers/pinctrl/sirf/pinctrl-atlas7.c 		bank = &a7gc->banks[idx];
a7gc             6074 drivers/pinctrl/sirf/pinctrl-atlas7.c 		bank->base = ATLAS7_GPIO_BASE(a7gc, idx);
a7gc             6092 drivers/pinctrl/sirf/pinctrl-atlas7.c 	platform_set_drvdata(pdev, a7gc);
a7gc             6102 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = dev_get_drvdata(dev);
a7gc             6107 drivers/pinctrl/sirf/pinctrl-atlas7.c 	for (idx = 0; idx < a7gc->nbank; idx++) {
a7gc             6108 drivers/pinctrl/sirf/pinctrl-atlas7.c 		bank = &a7gc->banks[idx];
a7gc             6120 drivers/pinctrl/sirf/pinctrl-atlas7.c 	struct atlas7_gpio_chip *a7gc = dev_get_drvdata(dev);
a7gc             6125 drivers/pinctrl/sirf/pinctrl-atlas7.c 	for (idx = 0; idx < a7gc->nbank; idx++) {
a7gc             6126 drivers/pinctrl/sirf/pinctrl-atlas7.c 		bank = &a7gc->banks[idx];