[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121114113138.GC23525@opensource.wolfsonmicro.com>
Date: Wed, 14 Nov 2012 11:31:38 +0000
From: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: sameo@...ux.intel.com, patches@...nsource.wolfsonmicro.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mfd: arizona: Sync regcache after reset
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@...nsource.wolfsonmicro.com>
---
I will look at the LDO reset and submit it as a seperate patch at
a later date.
drivers/mfd/arizona-core.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
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.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists