Lines Matching defs:offset
47 static int zx_direction_input(struct gpio_chip *gc, unsigned offset)
53 if (offset >= gc->ngpio)
58 gpiodir &= ~BIT(offset);
65 static int zx_direction_output(struct gpio_chip *gc, unsigned offset,
72 if (offset >= gc->ngpio)
77 gpiodir |= BIT(offset);
81 writew_relaxed(BIT(offset), chip->base + ZX_GPIO_DO1);
83 writew_relaxed(BIT(offset), chip->base + ZX_GPIO_DO0);
89 static int zx_get_value(struct gpio_chip *gc, unsigned offset)
93 return !!(readw_relaxed(chip->base + ZX_GPIO_DI) & BIT(offset));
96 static void zx_set_value(struct gpio_chip *gc, unsigned offset, int value)
101 writew_relaxed(BIT(offset), chip->base + ZX_GPIO_DO1);
103 writew_relaxed(BIT(offset), chip->base + ZX_GPIO_DO0);
110 int offset = irqd_to_hwirq(d);
113 u16 bit = BIT(offset);
115 if (offset < 0 || offset >= ZX_GPIO_NR)
159 int offset;
169 for_each_set_bit(offset, &pending, ZX_GPIO_NR)
171 offset));