Lines Matching refs:reg_val
220 u8 reg_val; in pca953x_gpio_direction_input() local
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()
249 u8 reg_val; in pca953x_gpio_direction_output() local
255 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
258 reg_val = chip->reg_output[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()
299 u32 reg_val; in pca953x_gpio_get_value() local
311 ret = pca953x_read_single(chip, offset, ®_val, off); in pca953x_gpio_get_value()
321 return (reg_val & (1u << (off % BANK_SZ))) ? 1 : 0; in pca953x_gpio_get_value()
327 u8 reg_val; in pca953x_gpio_set_value() local
332 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
335 reg_val = chip->reg_output[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()