aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-rw-r--r--drivers/power/ab8500_charger.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index a632b94e38b9..871bf5a7c42a 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -2671,13 +2671,23 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
2671 } 2671 }
2672 } 2672 }
2673 2673
2674 /* VBUS OVV set to 6.3V and enable automatic current limitiation */ 2674 if (is_ab9540_2p0(di->parent) || is_ab8505_2p0(di->parent))
2675 ret = abx500_set_register_interruptible(di->dev, 2675 ret = abx500_mask_and_set_register_interruptible(di->dev,
2676 AB8500_CHARGER, 2676 AB8500_CHARGER,
2677 AB8500_USBCH_CTRL2_REG, 2677 AB8500_USBCH_CTRL2_REG,
2678 VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA); 2678 VBUS_AUTO_IN_CURR_LIM_ENA,
2679 VBUS_AUTO_IN_CURR_LIM_ENA);
2680 else
2681 /*
2682 * VBUS OVV set to 6.3V and enable automatic current limitation
2683 */
2684 ret = abx500_set_register_interruptible(di->dev,
2685 AB8500_CHARGER,
2686 AB8500_USBCH_CTRL2_REG,
2687 VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA);
2679 if (ret) { 2688 if (ret) {
2680 dev_err(di->dev, "failed to set VBUS OVV\n"); 2689 dev_err(di->dev,
2690 "failed to set automatic current limitation\n");
2681 goto out; 2691 goto out;
2682 } 2692 }
2683 2693