mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] regulator: tps65910: Simplify setting enable_mask for regulators
@ 2013-12-29  9:00 Axel Lin
  2013-12-30 11:49 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-12-29  9:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: Markus Pargmann, Laxman Dewangan, Liam Girdwood, linux-kernel

BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
So all regulators have the same enable_mask setting.

BBCH_BBCHEN_MASK and BBCH_BBCHEN_SHIFT are not used now, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
v2: (Base on Markus' comment) remove unused BBCH_BBCHEN_* in tps65910.h.
 drivers/regulator/tps65910-regulator.c | 16 +---------------
 include/linux/mfd/tps65910.h           |  2 --
 2 files changed, 1 insertion(+), 17 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;
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index 1adeee1..16c2335 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -358,8 +358,6 @@
 /*Register BBCH  (0x80) register.RegisterDescription */
 #define BBCH_BBSEL_MASK					0x06
 #define BBCH_BBSEL_SHIFT				1
-#define BBCH_BBCHEN_MASK				0x01
-#define BBCH_BBCHEN_SHIFT				0
 
 
 /*Register DCDCCTRL  (0x80) register.RegisterDescription */
-- 
1.8.1.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] regulator: tps65910: Simplify setting enable_mask for regulators
  2013-12-29  9:00 [PATCH v2] regulator: tps65910: Simplify setting enable_mask for regulators Axel Lin
@ 2013-12-30 11:49 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-12-30 11:49 UTC (permalink / raw)
  To: Axel Lin; +Cc: Markus Pargmann, Laxman Dewangan, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

On Sun, Dec 29, 2013 at 05:00:20PM +0800, Axel Lin wrote:
> BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
> So all regulators have the same enable_mask setting.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-30 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-29  9:00 [PATCH v2] regulator: tps65910: Simplify setting enable_mask for regulators Axel Lin
2013-12-30 11:49 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®