/* Set the inital register states for the tca642x gpio expander  */
int tca642x_set_inital_state(uchar chip, struct tca642x_bank_info init_data[])
/* Set the inital register states for the tca642x gpio expander  */
int tca642x_set_inital_state(uchar chip, struct tca642x_bank_info init_data[])
{
	int i, ret;
	uint8_t config_reg;
	uint8_t polarity_reg;
	uint8_t output_reg;
	for (i = 0; i < 3; i++) {
		config_reg = tca642x_regs[i].configuration_reg;
		ret = tca642x_reg_write(chip, config_reg, 0xff,
				init_data[i].configuration_reg);
		polarity_reg = tca642x_regs[i].polarity_reg;
		ret = tca642x_reg_write(chip, polarity_reg, 0xff,
				init_data[i].polarity_reg);
		output_reg = tca642x_regs[i].output_reg;
		ret = tca642x_reg_write(chip, output_reg, 0xff,
				init_data[i].output_reg);
	}
	return ret;
}