Lines Matching refs:offset

61 static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)  in pl061_direction_input()  argument
67 if (offset >= gc->ngpio) in pl061_direction_input()
72 gpiodir &= ~(BIT(offset)); in pl061_direction_input()
79 static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, in pl061_direction_output() argument
86 if (offset >= gc->ngpio) in pl061_direction_output()
90 writeb(!!value << offset, chip->base + (BIT(offset + 2))); in pl061_direction_output()
92 gpiodir |= BIT(offset); in pl061_direction_output()
99 writeb(!!value << offset, chip->base + (BIT(offset + 2))); in pl061_direction_output()
105 static int pl061_get_value(struct gpio_chip *gc, unsigned offset) in pl061_get_value() argument
109 return !!readb(chip->base + (BIT(offset + 2))); in pl061_get_value()
112 static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value) in pl061_set_value() argument
116 writeb(!!value << offset, chip->base + (BIT(offset + 2))); in pl061_set_value()
123 int offset = irqd_to_hwirq(d); in pl061_irq_type() local
126 u8 bit = BIT(offset); in pl061_irq_type()
128 if (offset < 0 || offset >= PL061_GPIO_NR) in pl061_irq_type()
137 offset); in pl061_irq_type()
162 offset, in pl061_irq_type()
170 dev_dbg(gc->dev, "line %d: IRQ on both edges\n", offset); in pl061_irq_type()
186 offset, in pl061_irq_type()
195 offset); in pl061_irq_type()
210 int offset; in pl061_irq_handler() local
219 for_each_set_bit(offset, &pending, PL061_GPIO_NR) in pl061_irq_handler()
221 offset)); in pl061_irq_handler()
367 int offset; in pl061_suspend() local
376 for (offset = 0; offset < PL061_GPIO_NR; offset++) { in pl061_suspend()
377 if (chip->csave_regs.gpio_dir & (BIT(offset))) in pl061_suspend()
379 pl061_get_value(&chip->gc, offset) << offset; in pl061_suspend()
388 int offset; in pl061_resume() local
390 for (offset = 0; offset < PL061_GPIO_NR; offset++) { in pl061_resume()
391 if (chip->csave_regs.gpio_dir & (BIT(offset))) in pl061_resume()
392 pl061_direction_output(&chip->gc, offset, in pl061_resume()
394 (BIT(offset))); in pl061_resume()
396 pl061_direction_input(&chip->gc, offset); in pl061_resume()