aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-07 18:57:33 -0500
committerSamuel Ortiz <samuel@sortiz.org>2009-01-04 06:17:37 -0500
commit858e674466427b1236eb5ef9568999a7df286b1e (patch)
tree24ca231b73d6919b3b70f0f6a9b39b650d71e1fb
parent2c5212279a89224512e421fa9f8bd0fabbab77d8 (diff)
mfd: Add some documentation for WM8350 register lock
Hopefully this will make the purpose of these functions a bit clearer, it's not immediately obvious that the lock is a hardware feature. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
-rw-r--r--drivers/mfd/wm8350-core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c
index 0d47fb9e4b3b..d63a530c4fe8 100644
--- a/drivers/mfd/wm8350-core.c
+++ b/drivers/mfd/wm8350-core.c
@@ -299,6 +299,13 @@ int wm8350_block_write(struct wm8350 *wm8350, int start_reg, int regs,
299} 299}
300EXPORT_SYMBOL_GPL(wm8350_block_write); 300EXPORT_SYMBOL_GPL(wm8350_block_write);
301 301
302/**
303 * wm8350_reg_lock()
304 *
305 * The WM8350 has a hardware lock which can be used to prevent writes to
306 * some registers (generally those which can cause particularly serious
307 * problems if misused). This function enables that lock.
308 */
302int wm8350_reg_lock(struct wm8350 *wm8350) 309int wm8350_reg_lock(struct wm8350 *wm8350)
303{ 310{
304 u16 key = WM8350_LOCK_KEY; 311 u16 key = WM8350_LOCK_KEY;
@@ -314,6 +321,15 @@ int wm8350_reg_lock(struct wm8350 *wm8350)
314} 321}
315EXPORT_SYMBOL_GPL(wm8350_reg_lock); 322EXPORT_SYMBOL_GPL(wm8350_reg_lock);
316 323
324/**
325 * wm8350_reg_unlock()
326 *
327 * The WM8350 has a hardware lock which can be used to prevent writes to
328 * some registers (generally those which can cause particularly serious
329 * problems if misused). This function disables that lock so updates
330 * can be performed. For maximum safety this should be done only when
331 * required.
332 */
317int wm8350_reg_unlock(struct wm8350 *wm8350) 333int wm8350_reg_unlock(struct wm8350 *wm8350)
318{ 334{
319 u16 key = WM8350_UNLOCK_KEY; 335 u16 key = WM8350_UNLOCK_KEY;