Lines Matching refs:reg_val
209 u8 reg_val; in pca953x_gpio_direction_input() local
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()
238 u8 reg_val; in pca953x_gpio_direction_output() local
244 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
247 reg_val = chip->reg_output[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()
288 u32 reg_val; in pca953x_gpio_get_value() local
300 ret = pca953x_read_single(chip, offset, ®_val, off); in pca953x_gpio_get_value()
310 return (reg_val & (1u << (off % BANK_SZ))) ? 1 : 0; in pca953x_gpio_get_value()
316 u8 reg_val; in pca953x_gpio_set_value() local
321 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_set_value()
324 reg_val = chip->reg_output[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()