From: Graeme Gregory Date: Fri, 22 Jun 2012 12:36:20 +0000 (+0100) Subject: regulator: palmas: fix regmap offsets for enable/disable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a68de074613abd028b2ce63366d18db9c29e15d2;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git regulator: palmas: fix regmap offsets for enable/disable I forgot to apply the offsets for the regmap helper functions for enable/disable on SMPS10 and the LDO regulators. This means regulators will not enable/disable correctly. Signed-off-by: Graeme Gregory Tested-by: Sebastien Guiriec Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 9b7ca90057d..795f75a6ac3 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -673,7 +673,9 @@ static __devinit int palmas_probe(struct platform_device *pdev) pmic->desc[id].ops = &palmas_ops_smps10; pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL; pmic->desc[id].vsel_mask = SMPS10_VSEL; - pmic->desc[id].enable_reg = PALMAS_SMPS10_STATUS; + pmic->desc[id].enable_reg = + PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, + PALMAS_SMPS10_STATUS); pmic->desc[id].enable_mask = SMPS10_BOOST_EN; } @@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev) pmic->desc[id].type = REGULATOR_VOLTAGE; pmic->desc[id].owner = THIS_MODULE; - pmic->desc[id].enable_reg = palmas_regs_info[id].ctrl_addr; + pmic->desc[id].enable_reg = PALMAS_BASE_TO_REG(PALMAS_LDO_BASE, + palmas_regs_info[id].ctrl_addr); pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE; if (pdata && pdata->reg_data)