/* Enable/disable back-up battery (or super cap) charging on TWL6035/37. Please use defined BB_xxx values.  */
int twl603x_enable_bb_charge(u8 bb_fields)
/* Enable/disable back-up battery (or super cap) charging on TWL6035/37. Please use defined BB_xxx values.  */
int twl603x_enable_bb_charge(u8 bb_fields)
{
	u8 val = bb_fields & 0x0f;
	int err;
	val |= (VRTC_EN_SLP | VRTC_EN_OFF | VRTC_PWEN);
	err = palmas_i2c_write_u8(TWL603X_CHIP_P1, BB_VRTC_CTRL, val);
	if (err)
		printf("twl603x: could not set BB_VRTC_CTRL to 0x%02x: err = %d\n",
		       val, err);
	return err;
}