Lines Matching refs:off

118 				int off)  in pca953x_read_single()  argument
122 int offset = off / BANK_SZ; in pca953x_read_single()
137 int off) in pca953x_write_single() argument
141 int offset = off / BANK_SZ; in pca953x_write_single()
217 static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off) in pca953x_gpio_direction_input() argument
224 reg_val = chip->reg_direction[off / BANK_SZ] | (1u << (off % BANK_SZ)); in pca953x_gpio_direction_input()
234 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_input()
238 chip->reg_direction[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_input()
246 unsigned off, int val) in pca953x_gpio_direction_output() argument
255 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
256 | (1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
258 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
259 & ~(1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
269 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_output()
273 chip->reg_output[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_output()
276 reg_val = chip->reg_direction[off / BANK_SZ] & ~(1u << (off % BANK_SZ)); in pca953x_gpio_direction_output()
285 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_output()
289 chip->reg_direction[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_output()
296 static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off) in pca953x_gpio_get_value() argument
311 ret = pca953x_read_single(chip, offset, &reg_val, off); in pca953x_gpio_get_value()
321 return (reg_val & (1u << (off % BANK_SZ))) ? 1 : 0; in pca953x_gpio_get_value()
324 static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val) in pca953x_gpio_set_value() argument
332 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
333 | (1u << (off % BANK_SZ)); in pca953x_gpio_set_value()
335 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
336 & ~(1u << (off % BANK_SZ)); in pca953x_gpio_set_value()
346 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_set_value()
350 chip->reg_output[off / BANK_SZ] = reg_val; in pca953x_gpio_set_value()