public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] warp7: Fix the write to the LDOGCTL PMIC register
Date: Thu, 14 Feb 2019 11:32:02 -0200	[thread overview]
Message-ID: <20190214133202.1159-1-festevam@gmail.com> (raw)

The third parameter of the pmic_clrsetbits() function is the mask
to the register and the correct mask is 1 not 0.

Since the LDOGCTL only contains a single valid register (bit 0),
we can use pmic_reg_write() and write 1 directly, which fixes
the problem in a simpler way and use the original pmic function
that was used prior to the DM PMIC conversion.

Fixes: 8ba377321c86 ("arm: imx7s-warp: Convert to DM PMIC")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 board/warp7/warp7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 49f290f978..2882dc9870 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -77,7 +77,7 @@ int power_init_board(void)
 	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
 
 	/* disable Low Power Mode during standby mode */
-	pmic_clrsetbits(dev, PFUZE3000_LDOGCTL, 0, 1);
+	pmic_reg_write(dev, PFUZE3000_LDOGCTL, 1);
 
 	return 0;
 }
-- 
2.17.1

                 reply	other threads:[~2019-02-14 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190214133202.1159-1-festevam@gmail.com \
    --to=festevam@gmail.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