public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <Peng.Fan@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] power: pfuze100 correct SWBST macro definition
Date: Tue, 28 Jul 2015 22:48:51 +0800	[thread overview]
Message-ID: <1438094935-18213-2-git-send-email-Peng.Fan@freescale.com> (raw)
In-Reply-To: <1438094935-18213-1-git-send-email-Peng.Fan@freescale.com>

According to datasheet, SWBST_MODE starts from bit 2 and it occupies 2 bits.
So SWBST_MODE_MASK should be 0xC, and SWBST_MODE_xx should be ([mode] << 2).

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 include/power/pfuze100_pmic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
index 57b9ca9..cb10605 100644
--- a/include/power/pfuze100_pmic.h
+++ b/include/power/pfuze100_pmic.h
@@ -193,11 +193,11 @@ enum {
 #define SWBST_5_15V	3
 
 #define SWBST_VOL_MASK	0x3
-#define SWBST_MODE_MASK	0x6
-#define SWBST_MODE_OFF	(2 << 0)
-#define SWBST_MODE_PFM	(2 << 1)
+#define SWBST_MODE_MASK	0xC
+#define SWBST_MODE_OFF	(0 << 2)
+#define SWBST_MODE_PFM	(1 << 2)
 #define SWBST_MODE_AUTO	(2 << 2)
-#define SWBST_MODE_APS	(2 << 3)
+#define SWBST_MODE_APS	(3 << 2)
 
 /*
  * Regulator Mode Control
-- 
1.8.4

  reply	other threads:[~2015-07-28 14:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 14:48 [U-Boot] [PATCH 0/5] Power: pfuze100: support driver model and regulator Peng Fan
2015-07-28 14:48 ` Peng Fan [this message]
2015-08-02 22:30   ` [U-Boot] [PATCH 1/5] power: pfuze100 correct SWBST macro definition Simon Glass
2015-07-28 14:48 ` [U-Boot] [PATCH 2/5] power: regulator use node name when no regulator-name Peng Fan
2015-08-02 22:31   ` Simon Glass
2015-08-03  0:23     ` Peng Fan
2015-08-03 15:00       ` Przemyslaw Marczak
2015-08-04  0:12         ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 3/5] power: pmic: pfuze100 support driver model Peng Fan
2015-08-02 22:31   ` Simon Glass
2015-08-03 15:01   ` Przemyslaw Marczak
2015-08-04  0:15     ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 4/5] power: regulator: add pfuze100 support Peng Fan
2015-08-02 22:30   ` Simon Glass
2015-08-03  0:38     ` Peng Fan
2015-08-04  2:08       ` Peng Fan
2015-08-04 12:46         ` Simon Glass
2015-08-04 13:16           ` Przemyslaw Marczak
2015-08-04 13:16           ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 5/5] fsl: common: pfuze: no use original pfuze code if DM_PMIC Peng Fan
2015-08-02 22:30   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438094935-18213-2-git-send-email-Peng.Fan@freescale.com \
    --to=peng.fan@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox