From patchwork Thu Jun 16 12:34:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9180753 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 408C960760 for ; Thu, 16 Jun 2016 12:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A73827DA4 for ; Thu, 16 Jun 2016 12:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CC8F28359; Thu, 16 Jun 2016 12:36:40 +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 4C4DB27DA4 for ; Thu, 16 Jun 2016 12:36:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7BB6C266D92; Thu, 16 Jun 2016 14:36:38 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DE6EA266CAB; Thu, 16 Jun 2016 14:34:55 +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 3684C265817; Thu, 16 Jun 2016 14:34:53 +0200 (CEST) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [195.130.132.51]) by alsa0.perex.cz (Postfix) with ESMTP id 07B8626581B for ; Thu, 16 Jun 2016 14:34:40 +0200 (CEST) Received: from ayla.of.borg ([84.195.107.21]) by baptiste.telenet-ops.be with bizsmtp id 7Qae1t00X0TjorY01QaeRL; Thu, 16 Jun 2016 14:34:40 +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-0003zm-Qv; Thu, 16 Jun 2016 14:34:38 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1bDWVL-0002Z3-2o; Thu, 16 Jun 2016 14:34:39 +0200 From: Geert Uytterhoeven To: Liam Girdwood , Mark Brown Date: Thu, 16 Jun 2016 14:34:30 +0200 Message-Id: <1466080472-9817-2-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 1/3] ASoC: ak4613: 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 During system resume: kernel BUG at drivers/base/regmap/regcache.c:347! ... PC is at regcache_sync+0x1c/0x128 LR is at ak4613_resume+0x28/0x34 The ak4613 driver is using a regmap cache sync to restore the configuration of the chip on resume but does not actually define a register cache which means that the resume 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 --- sound/soc/codecs/ak4613.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index 33d2f2e10e2419d8..5013d2ba0c10a968 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -146,6 +146,7 @@ static const struct regmap_config ak4613_regmap_cfg = { .max_register = 0x16, .reg_defaults = ak4613_reg, .num_reg_defaults = ARRAY_SIZE(ak4613_reg), + .cache_type = REGCACHE_RBTREE, }; static const struct of_device_id ak4613_of_match[] = {