linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode
@ 2012-12-07  1:47 Axel Lin
  2012-12-07  4:45 ` Kim, Milo
  2012-12-07  5:20 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-12-07  1:47 UTC (permalink / raw)
  To: Mark Brown; +Cc: Milo(Woogyom) Kim, Liam Girdwood, linux-kernel

To clear the mask bit, setting data argument to be 0 with proper mask setting
for lp8788_update_bits. We don't need the var array here.

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

diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index 9c1c253..3792741 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -662,14 +662,6 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
 		[EN_DLDO7]   = LP8788_EN_SEL_DLDO7_M,
 		[EN_DLDO911] = LP8788_EN_SEL_DLDO911_M,
 	};
-	u8 val[] = {
-		[EN_ALDO1]   = 0 << 5,
-		[EN_ALDO234] = 0 << 4,
-		[EN_ALDO5]   = 0 << 3,
-		[EN_ALDO7]   = 0 << 2,
-		[EN_DLDO7]   = 0 << 1,
-		[EN_DLDO911] = 0 << 0,
-	};
 
 	switch (id) {
 	case DLDO7:
@@ -708,8 +700,7 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
 	return ret;
 
 set_default_ldo_enable_mode:
-	return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id],
-				val[enable_id]);
+	return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id], 0);
 }
 
 static int lp8788_dldo_probe(struct platform_device *pdev)
-- 
1.7.9.5




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

* RE: [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode
  2012-12-07  1:47 [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode Axel Lin
@ 2012-12-07  4:45 ` Kim, Milo
  2012-12-07  5:20 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kim, Milo @ 2012-12-07  4:45 UTC (permalink / raw)
  To: Axel Lin; +Cc: Girdwood, Liam, linux-kernel, Mark Brown

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 409 bytes --]

> To clear the mask bit, setting data argument to be 0 with proper mask
> setting
> for lp8788_update_bits. We don't need the var array here.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Thanks!

Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode
  2012-12-07  1:47 [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode Axel Lin
  2012-12-07  4:45 ` Kim, Milo
@ 2012-12-07  5:20 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-12-07  5:20 UTC (permalink / raw)
  To: Axel Lin; +Cc: Milo(Woogyom) Kim, Liam Girdwood, linux-kernel

On Fri, Dec 07, 2012 at 09:47:57AM +0800, Axel Lin wrote:
> To clear the mask bit, setting data argument to be 0 with proper mask setting
> for lp8788_update_bits. We don't need the var array here.

Applied, thanks.

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

end of thread, other threads:[~2012-12-07  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-07  1:47 [PATCH] regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode Axel Lin
2012-12-07  4:45 ` Kim, Milo
2012-12-07  5:20 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).