lkml.org 
[lkml]   [2013]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: tps65910: Simplify setting enable_mask for regulators
From
Date
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
So all regulators have the same enable_mask setting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/tps65910-regulator.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 979ea0a..f50dd84 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1207,21 +1207,7 @@ static int tps65910_probe(struct platform_device *pdev)
pmic->desc[i].type = REGULATOR_VOLTAGE;
pmic->desc[i].owner = THIS_MODULE;
pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i);
-
- switch (i) {
- case TPS65910_REG_VBB:
- if (tps65910_chip_id(tps65910) == TPS65910)
- pmic->desc[i].enable_mask = BBCH_BBCHEN_MASK;
- else
- pmic->desc[i].enable_mask =
- TPS65910_SUPPLY_STATE_ENABLED;
- break;
-
- default:
- pmic->desc[i].enable_mask =
- TPS65910_SUPPLY_STATE_ENABLED;
- break;
- }
+ pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED;

config.dev = tps65910->dev;
config.init_data = reg_data;
--
1.8.1.2




\
 
 \ /
  Last update: 2013-12-28 04:21    [W:0.632 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site