Lines Matching defs:offset
267 static void lpc18xx_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
270 writeb(value ? 1 : 0, gc->base + offset);
273 static int lpc18xx_gpio_get(struct gpio_chip *chip, unsigned offset)
276 return !!readb(gc->base + offset);
279 static int lpc18xx_gpio_direction(struct gpio_chip *chip, unsigned offset,
286 port = offset / LPC18XX_PINS_PER_PORT;
287 pin = offset % LPC18XX_PINS_PER_PORT;
302 unsigned offset)
304 return lpc18xx_gpio_direction(chip, offset, false);
308 unsigned offset, int value)
310 lpc18xx_gpio_set(chip, offset, value);
311 return lpc18xx_gpio_direction(chip, offset, true);