Lines Matching refs:offset
108 unsigned int offset) in _tz1090_gpio_clear_bit() argument
113 value &= ~BIT(offset); in _tz1090_gpio_clear_bit()
119 unsigned int offset) in tz1090_gpio_clear_bit() argument
124 _tz1090_gpio_clear_bit(bank, reg_offs, offset); in tz1090_gpio_clear_bit()
131 unsigned int offset) in _tz1090_gpio_set_bit() argument
136 value |= BIT(offset); in _tz1090_gpio_set_bit()
142 unsigned int offset) in tz1090_gpio_set_bit() argument
147 _tz1090_gpio_set_bit(bank, reg_offs, offset); in tz1090_gpio_set_bit()
154 unsigned int offset, in _tz1090_gpio_mod_bit() argument
160 value &= ~BIT(offset); in _tz1090_gpio_mod_bit()
162 value |= BIT(offset); in _tz1090_gpio_mod_bit()
168 unsigned int offset, in tz1090_gpio_mod_bit() argument
174 _tz1090_gpio_mod_bit(bank, reg_offs, offset, val); in tz1090_gpio_mod_bit()
180 unsigned int offset) in tz1090_gpio_read_bit() argument
182 return tz1090_gpio_read(bank, reg_offs) & BIT(offset); in tz1090_gpio_read_bit()
188 unsigned int offset) in tz1090_gpio_direction_input() argument
191 tz1090_gpio_set_bit(bank, REG_GPIO_DIR, offset); in tz1090_gpio_direction_input()
197 unsigned int offset, int output_value) in tz1090_gpio_direction_output() argument
203 _tz1090_gpio_mod_bit(bank, REG_GPIO_DOUT, offset, output_value); in tz1090_gpio_direction_output()
204 _tz1090_gpio_clear_bit(bank, REG_GPIO_DIR, offset); in tz1090_gpio_direction_output()
213 static int tz1090_gpio_get(struct gpio_chip *chip, unsigned int offset) in tz1090_gpio_get() argument
217 return tz1090_gpio_read_bit(bank, REG_GPIO_DIN, offset); in tz1090_gpio_get()
223 static void tz1090_gpio_set(struct gpio_chip *chip, unsigned int offset, in tz1090_gpio_set() argument
228 tz1090_gpio_mod_bit(bank, REG_GPIO_DOUT, offset, output_value); in tz1090_gpio_set()
231 static int tz1090_gpio_request(struct gpio_chip *chip, unsigned int offset) in tz1090_gpio_request() argument
236 ret = pinctrl_request_gpio(chip->base + offset); in tz1090_gpio_request()
240 tz1090_gpio_set_bit(bank, REG_GPIO_DIR, offset); in tz1090_gpio_request()
241 tz1090_gpio_set_bit(bank, REG_GPIO_BIT_EN, offset); in tz1090_gpio_request()
246 static void tz1090_gpio_free(struct gpio_chip *chip, unsigned int offset) in tz1090_gpio_free() argument
250 pinctrl_free_gpio(chip->base + offset); in tz1090_gpio_free()
252 tz1090_gpio_clear_bit(bank, REG_GPIO_BIT_EN, offset); in tz1090_gpio_free()
255 static int tz1090_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) in tz1090_gpio_to_irq() argument
262 return irq_create_mapping(bank->domain, offset); in tz1090_gpio_to_irq()
274 unsigned int offset, unsigned int polarity) in tz1090_gpio_irq_polarity() argument
276 tz1090_gpio_mod_bit(bank, REG_GPIO_IRQ_PLRT, offset, polarity); in tz1090_gpio_irq_polarity()
280 unsigned int offset, unsigned int type) in tz1090_gpio_irq_type() argument
282 tz1090_gpio_mod_bit(bank, REG_GPIO_IRQ_TYPE, offset, type); in tz1090_gpio_irq_type()
287 unsigned int offset) in tz1090_gpio_irq_next_edge() argument
299 value_p &= ~BIT(offset); in tz1090_gpio_irq_next_edge()
300 value_p |= value_i & BIT(offset); in tz1090_gpio_irq_next_edge()