Skip to contentSkip to conversation

WM8350 updates

PATCH In review Mark Brown 2 participants 4 messages Oct 20, 2008

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover WM8350 updates

A couple of minor WM8350 updates here. The first, from Stephen Rothwell needs to be merged with Linus fairly urgently. The second is less urgent since nothing merged should be affected, though it should still be safe to merge.

author
#1 lore raw

PATCH 1/2 mfd/wm8350: don't export static functions

From: Stephen Rothwell <[email protected]>

Today's linux-next build (powerpc allyesconfig) failed like this:

drivers/mfd/wm8350-core.c:1131: error: __ksymtab_wm8350_create_cache causes a section type conflict

Caused by commit 89b4012befb1abca5e86d232bc0e2a797b0d9825 ("mfd: Core support for the WM8350 AudioPlus PMIC"). wm8350_create_cache is not used elsewhere, so remove the EXPORT_SYMBOL.

---
 drivers/mfd/wm8350-core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/mfd/wm8350-core.c +0 -1
index bf87f67..fbe22fb 100644
@@ -1128,7 +1128,6 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int mode)
 out:
 	return ret;
 }
-EXPORT_SYMBOL_GPL(wm8350_create_cache);
 
 /*
  * Register a client device.  This is non-fatal since there is no need to
Signature · 1 line
1.5.6.5
author
#2 lore raw

PATCH 2/2 mfd: Don't store volatile bits in WM8350 register cache

This makes the contents of the cache clearer and fixes incorrect initialisation of the cache for partially volatile registers.

---
 drivers/mfd/wm8350-core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mfd/wm8350-core.c +4 -0
index fbe22fb..0d47fb9 100644
@@ -183,6 +183,9 @@ static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src)
 			(wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable)
 			| src[i - reg];
 
+		/* Don't store volatile bits */
+		wm8350->reg_cache[i] &= ~wm8350_reg_io_map[i].vol;
+
 		src[i - reg] = cpu_to_be16(src[i - reg]);
 	}
 
@@ -1120,6 +1123,7 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int mode)
 			}
 			value = be16_to_cpu(value);
 			value &= wm8350_reg_io_map[i].readable;
+			value &= ~wm8350_reg_io_map[i].vol;
 			wm8350->reg_cache[i] = value;
 		} else
 			wm8350->reg_cache[i] = reg_map[i];
Signature · 1 line
1.5.6.5
#3 lore raw
In reply to Mark Brown

Hi Mark,

Quoted 4 lines · Mark Brown

A couple of minor WM8350 updates here. The first, from Stephen Rothwell needs to be merged with Linus fairly urgently. The second is less urgent since nothing merged should be affected, though it should still be safe to merge.

Both of them merged to my mfd-next tree. I'll send a pull request to Linus tomorrow.

Thanks for the patches.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/