Lines Matching defs:offset
63 static int pl061_get_direction(struct gpio_chip *gc, unsigned offset)
67 if (readb(pl061->base + GPIODIR) & BIT(offset))
73 static int pl061_direction_input(struct gpio_chip *gc, unsigned offset)
81 gpiodir &= ~(BIT(offset));
88 static int pl061_direction_output(struct gpio_chip *gc, unsigned offset,
96 writeb(!!value << offset, pl061->base + (BIT(offset + 2)));
98 gpiodir |= BIT(offset);
105 writeb(!!value << offset, pl061->base + (BIT(offset + 2)));
111 static int pl061_get_value(struct gpio_chip *gc, unsigned offset)
115 return !!readb(pl061->base + (BIT(offset + 2)));
118 static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value)
122 writeb(!!value << offset, pl061->base + (BIT(offset + 2)));
129 int offset = irqd_to_hwirq(d);
132 u8 bit = BIT(offset);
134 if (offset < 0 || offset >= PL061_GPIO_NR)
143 offset);
168 offset,
176 dev_dbg(gc->parent, "line %d: IRQ on both edges\n", offset);
192 offset,
201 offset);
216 int offset;
225 for_each_set_bit(offset, &pending, PL061_GPIO_NR)
227 offset);
372 int offset;
381 for (offset = 0; offset < PL061_GPIO_NR; offset++) {
382 if (pl061->csave_regs.gpio_dir & (BIT(offset)))
384 pl061_get_value(&pl061->gc, offset) << offset;
393 int offset;
395 for (offset = 0; offset < PL061_GPIO_NR; offset++) {
396 if (pl061->csave_regs.gpio_dir & (BIT(offset)))
397 pl061_direction_output(&pl061->gc, offset,
399 (BIT(offset)));
401 pl061_direction_input(&pl061->gc, offset);