Lines Matching refs:ret

106 	int ret;  in tps80031_reg_is_enabled()  local
111 ret = tps80031_read(parent, TPS80031_SLAVE_ID1, ri->rinfo->state_reg, in tps80031_reg_is_enabled()
113 if (ret < 0) { in tps80031_reg_is_enabled()
115 ri->rinfo->state_reg, ret); in tps80031_reg_is_enabled()
116 return ret; in tps80031_reg_is_enabled()
125 int ret; in tps80031_reg_enable() local
130 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, ri->rinfo->state_reg, in tps80031_reg_enable()
132 if (ret < 0) { in tps80031_reg_enable()
134 ri->rinfo->state_reg, ret); in tps80031_reg_enable()
135 return ret; in tps80031_reg_enable()
137 return ret; in tps80031_reg_enable()
144 int ret; in tps80031_reg_disable() local
149 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, ri->rinfo->state_reg, in tps80031_reg_disable()
151 if (ret < 0) in tps80031_reg_disable()
153 ri->rinfo->state_reg, ret); in tps80031_reg_disable()
154 return ret; in tps80031_reg_disable()
183 int ret; in tps80031_dcdc_set_voltage_sel() local
187 ret = tps80031_read(parent, ri->rinfo->volt_id, in tps80031_dcdc_set_voltage_sel()
189 if (ret < 0) { in tps80031_dcdc_set_voltage_sel()
191 ri->rinfo->force_reg, ret); in tps80031_dcdc_set_voltage_sel()
192 return ret; in tps80031_dcdc_set_voltage_sel()
195 ret = tps80031_update(parent, ri->rinfo->volt_id, in tps80031_dcdc_set_voltage_sel()
197 if (ret < 0) in tps80031_dcdc_set_voltage_sel()
200 ri->rinfo->force_reg, ret); in tps80031_dcdc_set_voltage_sel()
201 return ret; in tps80031_dcdc_set_voltage_sel()
204 ret = tps80031_update(parent, ri->rinfo->volt_id, in tps80031_dcdc_set_voltage_sel()
206 if (ret < 0) in tps80031_dcdc_set_voltage_sel()
208 ri->rinfo->volt_reg, ret); in tps80031_dcdc_set_voltage_sel()
209 return ret; in tps80031_dcdc_set_voltage_sel()
217 int ret; in tps80031_dcdc_get_voltage_sel() local
220 ret = tps80031_read(parent, ri->rinfo->volt_id, in tps80031_dcdc_get_voltage_sel()
222 if (ret < 0) { in tps80031_dcdc_get_voltage_sel()
224 ri->rinfo->force_reg, ret); in tps80031_dcdc_get_voltage_sel()
225 return ret; in tps80031_dcdc_get_voltage_sel()
231 ret = tps80031_read(parent, ri->rinfo->volt_id, in tps80031_dcdc_get_voltage_sel()
233 if (ret < 0) { in tps80031_dcdc_get_voltage_sel()
235 ri->rinfo->volt_reg, ret); in tps80031_dcdc_get_voltage_sel()
236 return ret; in tps80031_dcdc_get_voltage_sel()
289 int ret = -EIO; in tps80031_vbus_is_enabled() local
293 ret = tps80031_read(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_is_enabled()
295 if (ret < 0) { in tps80031_vbus_is_enabled()
297 TPS80031_CHARGERUSB_CTRL1, ret); in tps80031_vbus_is_enabled()
298 return ret; in tps80031_vbus_is_enabled()
300 ret = tps80031_read(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_is_enabled()
302 if (ret < 0) { in tps80031_vbus_is_enabled()
304 TPS80031_CHARGERUSB_CTRL3, ret); in tps80031_vbus_is_enabled()
305 return ret; in tps80031_vbus_is_enabled()
309 return ret; in tps80031_vbus_is_enabled()
316 int ret; in tps80031_vbus_enable() local
318 ret = tps80031_set_bits(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_enable()
320 if (ret < 0) { in tps80031_vbus_enable()
322 TPS80031_CHARGERUSB_CTRL1, ret); in tps80031_vbus_enable()
323 return ret; in tps80031_vbus_enable()
326 ret = tps80031_set_bits(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_enable()
328 if (ret < 0) { in tps80031_vbus_enable()
330 TPS80031_CHARGERUSB_CTRL3, ret); in tps80031_vbus_enable()
331 return ret; in tps80031_vbus_enable()
333 return ret; in tps80031_vbus_enable()
340 int ret = 0; in tps80031_vbus_disable() local
343 ret = tps80031_write(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_disable()
345 if (ret < 0) { in tps80031_vbus_disable()
347 USB_VBUS_CTRL_SET, ret); in tps80031_vbus_disable()
348 return ret; in tps80031_vbus_disable()
352 ret = tps80031_clr_bits(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_disable()
354 if (ret < 0) { in tps80031_vbus_disable()
356 TPS80031_CHARGERUSB_CTRL1, ret); in tps80031_vbus_disable()
357 return ret; in tps80031_vbus_disable()
360 ret = tps80031_clr_bits(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_disable()
362 if (ret < 0) { in tps80031_vbus_disable()
364 TPS80031_CHARGERUSB_CTRL3, ret); in tps80031_vbus_disable()
365 return ret; in tps80031_vbus_disable()
370 ret = tps80031_write(parent, TPS80031_SLAVE_ID2, in tps80031_vbus_disable()
372 if (ret < 0) { in tps80031_vbus_disable()
374 USB_VBUS_CTRL_CLR, ret); in tps80031_vbus_disable()
375 return ret; in tps80031_vbus_disable()
378 return ret; in tps80031_vbus_disable()
511 int ret = 0; in tps80031_power_req_config() local
516 ret = tps80031_ext_power_req_config(parent, ri->ext_ctrl_flag, in tps80031_power_req_config()
519 if (ret < 0) { in tps80031_power_req_config()
520 dev_err(ri->dev, "ext powerreq config failed, err = %d\n", ret); in tps80031_power_req_config()
521 return ret; in tps80031_power_req_config()
526 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, in tps80031_power_req_config()
529 if (ret < 0) { in tps80031_power_req_config()
531 ri->rinfo->trans_reg, ret); in tps80031_power_req_config()
532 return ret; in tps80031_power_req_config()
535 return ret; in tps80031_power_req_config()
542 int ret = 0; in tps80031_regulator_config() local
554 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, in tps80031_regulator_config()
557 if (ret < 0) { in tps80031_regulator_config()
559 "LDOUSB config failed, e= %d\n", ret); in tps80031_regulator_config()
560 return ret; in tps80031_regulator_config()
567 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, in tps80031_regulator_config()
570 if (ret < 0) { in tps80031_regulator_config()
572 "LDO3 config failed, e = %d\n", ret); in tps80031_regulator_config()
573 return ret; in tps80031_regulator_config()
588 ret = tps80031_update(parent, TPS80031_SLAVE_ID1, ri->rinfo->trans_reg, in tps80031_regulator_config()
592 if (ret < 0) { in tps80031_regulator_config()
593 dev_err(ri->dev, "trans reg update failed, e %d\n", ret); in tps80031_regulator_config()
594 return ret; in tps80031_regulator_config()
597 return ret; in tps80031_regulator_config()
604 int ret; in check_smps_mode_mult() local
608 ret = tps80031_read(parent, TPS80031_SLAVE_ID1, in check_smps_mode_mult()
610 if (ret < 0) { in check_smps_mode_mult()
612 return ret; in check_smps_mode_mult()
615 ret = tps80031_read(parent, TPS80031_SLAVE_ID1, in check_smps_mode_mult()
617 if (ret < 0) { in check_smps_mode_mult()
619 return ret; in check_smps_mode_mult()
684 int ret; in tps80031_regulator_probe() local
715 ret = tps80031_regulator_config(pdev->dev.parent, in tps80031_regulator_probe()
717 if (ret < 0) { in tps80031_regulator_probe()
719 "regulator config failed, e %d\n", ret); in tps80031_regulator_probe()
720 return ret; in tps80031_regulator_probe()
723 ret = tps80031_power_req_config(pdev->dev.parent, in tps80031_regulator_probe()
725 if (ret < 0) { in tps80031_regulator_probe()
727 "pwr_req config failed, err %d\n", ret); in tps80031_regulator_probe()
728 return ret; in tps80031_regulator_probe()