/* tps65217_voltage_update() - Function to change a voltage level, as this is a multi-step process. @dc_cntrl_reg: DC voltage control register to change. @volt_sel: New value for the voltage register  */
int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
/* tps65217_voltage_update() - Function to change a voltage level, as this is a multi-step process. @dc_cntrl_reg: DC voltage control register to change. @volt_sel: New value for the voltage register  */
int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
{
	if ((dc_cntrl_reg != TPS65217_DEFDCDC1) &&
	    (dc_cntrl_reg != TPS65217_DEFDCDC2) &&
	    (dc_cntrl_reg != TPS65217_DEFDCDC3))
		return 1;
	if (tps65217_reg_write(TPS65217_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
			       TPS65217_MASK_ALL_BITS))
		return 1;
	if (tps65217_reg_write(TPS65217_PROT_LEVEL_2, TPS65217_DEFSLEW,
			       TPS65217_DCDC_GO, TPS65217_DCDC_GO))
		return 1;
	return 0;
}