Lines Matching refs:off

107 				int off)  in pca953x_read_single()  argument
111 int offset = off / BANK_SZ; in pca953x_read_single()
126 int off) in pca953x_write_single() argument
130 int offset = off / BANK_SZ; in pca953x_write_single()
206 static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off) in pca953x_gpio_direction_input() argument
213 reg_val = chip->reg_direction[off / BANK_SZ] | (1u << (off % BANK_SZ)); in pca953x_gpio_direction_input()
223 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_input()
227 chip->reg_direction[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_input()
235 unsigned off, int val) in pca953x_gpio_direction_output() argument
244 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
245 | (1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
247 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
248 & ~(1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
258 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_output()
262 chip->reg_output[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_output()
265 reg_val = chip->reg_direction[off / BANK_SZ] & ~(1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
274 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_output()
278 chip->reg_direction[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_output()
285 static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off) in pca953x_gpio_get_value() argument
300 ret = pca953x_read_single(chip, offset, &reg_val, off); in pca953x_gpio_get_value()
310 return (reg_val & (1u << (off % BANK_SZ))) ? 1 : 0; in pca953x_gpio_get_value()
313 static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val) in pca953x_gpio_set_value() argument
321 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
322 | (1u << (off % BANK_SZ)); in pca953x_gpio_set_value()
324 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
325 & ~(1u << (off % BANK_SZ)); in pca953x_gpio_set_value()
335 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_set_value()
339 chip->reg_output[off / BANK_SZ] = reg_val; in pca953x_gpio_set_value()