Lines Matching refs:offset
85 #define giu_read(offset) readw(giu_base + (offset))
86 #define giu_write(offset, value) writew((value), giu_base + (offset))
92 static inline u16 giu_set(u16 offset, u16 set)
96 data = giu_read(offset);
98 giu_write(offset, data);
103 static inline u16 giu_clear(u16 offset, u16 clear)
107 data = giu_read(offset);
109 giu_write(offset, data);
315 u16 offset, mask, reg;
322 offset = GIUIOSELL;
325 offset = GIUIOSELH;
329 offset = GIUPODATEN;
334 offset = GIUPODATH;
338 offset = GIUPODATH;
349 reg = giu_read(offset);
354 giu_write(offset, reg);
429 u16 offset, mask, reg;
436 offset = GIUPIODL;
439 offset = GIUPIODH;
442 offset = GIUPODATL;
445 offset = GIUPODATH;
451 reg = giu_read(offset);
456 giu_write(offset, reg);
462 static int vr41xx_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
464 return giu_set_direction(chip, offset, GPIO_INPUT);
467 static int vr41xx_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
470 vr41xx_gpio_set(chip, offset, value);
472 return giu_set_direction(chip, offset, GPIO_OUTPUT);
475 static int vr41xx_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
477 if (offset >= chip->ngpio)
480 return GIU_IRQ_BASE + offset;