From patchwork Thu Jun 16 12:34:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9180745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71BF360760 for ; Thu, 16 Jun 2016 12:35:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D4E327F07 for ; Thu, 16 Jun 2016 12:35:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5040B2835A; Thu, 16 Jun 2016 12:35:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9778D27F07 for ; Thu, 16 Jun 2016 12:35:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C5F37266D2E; Thu, 16 Jun 2016 14:35:26 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F3246266C25; Thu, 16 Jun 2016 14:34:49 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7C27C265770; Thu, 16 Jun 2016 14:34:47 +0200 (CEST) Received: from andre.telenet-ops.be (andre.telenet-ops.be [195.130.132.53]) by alsa0.perex.cz (Postfix) with ESMTP id 296442657F8 for ; Thu, 16 Jun 2016 14:34:40 +0200 (CEST) Received: from ayla.of.borg ([84.195.107.21]) by andre.telenet-ops.be with bizsmtp id 7Qae1t00d0TjorY01Qae1a; Thu, 16 Jun 2016 14:34:39 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1bDWVK-0003zu-S5; Thu, 16 Jun 2016 14:34:38 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1bDWVL-0002ZD-4O; Thu, 16 Jun 2016 14:34:39 +0200 From: Geert Uytterhoeven To: Liam Girdwood , Mark Brown Date: Thu, 16 Jun 2016 14:34:32 +0200 Message-Id: <1466080472-9817-4-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466080472-9817-1-git-send-email-geert+renesas@glider.be> References: <1466080472-9817-1-git-send-email-geert+renesas@glider.be> Cc: linux-renesas-soc@vger.kernel.org, alsa-devel@alsa-project.org, Kuninori Morimoto , Geert Uytterhoeven , patches@opensource.wolfsonmicro.com, Peter Ujfalusi Subject: [alsa-devel] [PATCH 3/3] ASoC: wm8940: Enable cache usage to fix crashes on resume X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The wm8940 driver is using a regmap cache sync to restore the configuration of the chip when switching from OFF to STANDBY, but does not actually define a register cache which means that the restore is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown . Signed-off-by: Geert Uytterhoeven Acked-by: Charles Keepax --- Untested. --- sound/soc/codecs/wm8940.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index f6f9395ea38ef88b..1c600819f7689b45 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = { .max_register = WM8940_MONOMIX, .reg_defaults = wm8940_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults), + .cache_type = REGCACHE_RBTREE, .readable_reg = wm8940_readable_register, .volatile_reg = wm8940_volatile_register,