/* Read current logic level of all IO pins  */
int tca642x_get_val(uchar chip, uint8_t gpio_bank)
/* Read current logic level of all IO pins  */
int tca642x_get_val(uchar chip, uint8_t gpio_bank)
{
	uint8_t val;
	uint8_t in_reg = tca642x_regs[gpio_bank].input_reg;
	if (tca642x_reg_read(chip, in_reg, &val) < 0)
		return -1;
	return (int)val;
}