From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
patches@opensource.wolfsonmicro.com,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 5/5] mfd: arizona: Sync regcache after reset
Date: Tue, 20 Nov 2012 13:46:21 +0900 [thread overview]
Message-ID: <1353386781-10468-5-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1353386781-10468-1-git-send-email-broonie@opensource.wolfsonmicro.com>
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
In the absence of a physical reset line the chip is reset by writing the
first register, which is done after the register patch has been applied.
This patch synchronises the register cache after the reset to preserve
any register changes that had been applied.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/mfd/arizona-core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 202bf55..ad1ca49 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -415,11 +415,19 @@ int __devinit arizona_dev_init(struct arizona *arizona)
/* If we have a /RESET GPIO we'll already be reset */
if (!arizona->pdata.reset) {
+ regcache_mark_dirty(arizona->regmap);
+
ret = regmap_write(arizona->regmap, ARIZONA_SOFTWARE_RESET, 0);
if (ret != 0) {
dev_err(dev, "Failed to reset device: %d\n", ret);
goto err_reset;
}
+
+ ret = regcache_sync(arizona->regmap);
+ if (ret != 0) {
+ dev_err(dev, "Failed to sync device: %d\n", ret);
+ goto err_ldoena;
+ }
}
ret = arizona_wait_for_boot(arizona);
--
1.7.10.4
next prev parent reply other threads:[~2012-11-20 4:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 4:45 [PATCH 0/5] mfd: arizona: Updates for v3.7 Mark Brown
2012-11-20 4:46 ` [PATCH 1/5] mfd: wm5102: Update register patch for latest evaluation Mark Brown
2012-11-20 4:46 ` [PATCH 2/5] mfd: wm5110: Disable control interface error report for WM5110 rev B Mark Brown
2012-11-20 4:46 ` [PATCH 3/5] mfd: arizona: Use correct array for ARRAY_SIZE in mfd_add_devices call Mark Brown
2012-11-20 4:46 ` [PATCH 4/5] mfd: arizona: Correctly report when AIF2/AIF1 is underclocked Mark Brown
2012-11-20 4:46 ` Mark Brown [this message]
2012-11-20 5:48 ` [PATCH 5/5] mfd: arizona: Sync regcache after reset Mark Brown
2012-11-20 5:49 ` [PATCH] " Mark Brown
2012-11-20 11:47 ` [PATCH 0/5] mfd: arizona: Updates for v3.7 Samuel Ortiz
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=1353386781-10468-5-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.com \
/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
all inboxes | Powered by JetHome®