Lines Matching defs:offset
61 static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned int offset,
65 u8 reg_offset = offset / 32;
70 static void __iomem *gpio_reg_and_bit(struct gpio_chip *chip, unsigned int offset,
74 u8 reg_offset = offset / 32;
75 u8 shift = offset % 32;
81 static int tng_gpio_get(struct gpio_chip *chip, unsigned int offset)
86 gplr = gpio_reg_and_bit(chip, offset, GPLR, &shift);
91 static void tng_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
98 reg = gpio_reg_and_bit(chip, offset, value ? GPSR : GPCR, &shift);
107 static int tng_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
115 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift);
128 static int tng_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
136 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift);
137 tng_gpio_set(chip, offset, value);
150 static int tng_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
155 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift);
163 static int tng_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
172 gfbr = gpio_reg_and_bit(chip, offset, GFBR, &shift);
188 static int tng_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
197 return gpiochip_generic_config(chip, offset, config);
200 return tng_gpio_set_debounce(chip, offset, debounce);