From e80325b62387d1e85e6555a2a8eb16379e97af8d Mon Sep 17 00:00:00 2001 From: merge Date: Mon, 2 Mar 2009 11:15:46 +0000 Subject: MERGE-via-pending-tracking-hist-asoc-only-write-back-non-defau pending-tracking-hist top was asoc-only-write-back-non-defau / 04f55b6c2392d4af2b8b2178c333c7f131d3cdc0 ... parent commitmessage: From: Mark Brown ASoC: Only write back non-default registers when resuming WM8753 This will reduce the number of writes done on resume, allowing that to complete faster (especially on systems with very slow I2C like the current Samsung driver). Signed-off-by: Mark Brown --- sound/soc/codecs/wm8753.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 8dbf6083b87..5812668ce94 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -51,8 +51,6 @@ #include "wm8753.h" -#define WM8753_VERSION "0.16" - static int caps_charge = 2000; module_param(caps_charge, int, 0); MODULE_PARM_DESC(caps_charge, "WM8753 cap charge time (msecs)"); @@ -1537,6 +1535,11 @@ static int wm8753_resume(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(wm8753_reg); i++) { if (i + 1 == WM8753_RESET) continue; + + /* No point in writing hardware default values back */ + if (cache[i] == wm8753_reg[i]) + continue; + data[0] = ((i + 1) << 1) | ((cache[i] >> 8) & 0x0001); data[1] = cache[i] & 0x00ff; codec->hw_write(codec->control_data, data, 2); @@ -1807,8 +1810,6 @@ static int wm8753_probe(struct platform_device *pdev) struct wm8753_priv *wm8753; int ret = 0; - pr_info("WM8753 Audio Codec %s\n", WM8753_VERSION); - setup = socdev->codec_data; codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); if (codec == NULL) -- cgit v1.2.3