From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0607BC04AB1 for ; Thu, 9 May 2019 18:44:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D080C2182B for ; Thu, 9 May 2019 18:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557427486; bh=MOZrTxGSqKnDh5cfgtBT8RTiA31Qm7MZwDzqMBAmq68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NBtB6b8v7OwdEhZ2xsoA51VVkyBC6MYTAP4x4hNVLYbV+kaGznv9zP3oAk/FntOwa n7tOCMnb4nAX8jxeyXqHti/YnfLvPpy4Nmo7jUhP7sT9m2v0g/oQDI3hHYZSyDsjE8 ioMj3foH+Lzyjn8e+YpFx+yBZtk5cQBhE3GmerpI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbfEISop (ORCPT ); Thu, 9 May 2019 14:44:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbfEISoo (ORCPT ); Thu, 9 May 2019 14:44:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61DC22182B; Thu, 9 May 2019 18:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557427483; bh=MOZrTxGSqKnDh5cfgtBT8RTiA31Qm7MZwDzqMBAmq68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HewspAQDTgcFZ594kgyaZjo0NjwYqX1ppw/I+lodmQQ1jBOTsGc9TkzbqHh7SR8rG WGeIKD15XuELhIgIx8Yskv5EjHzW41OwqEuDPjm5KufNRaAjFpKP5cnFfiJbfSOw1P Fafckz6uaXQTYv5BscYyWu6YOM9p8ZY1BT/4z/Do= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Mack , Mark Brown , Sasha Levin Subject: [PATCH 4.9 06/28] ASoC: cs4270: Set auto-increment bit for register writes Date: Thu, 9 May 2019 20:41:58 +0200 Message-Id: <20190509181251.492224703@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509181247.647767531@linuxfoundation.org> References: <20190509181247.647767531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f0f2338a9cfaf71db895fa989ea7234e8a9b471d ] The CS4270 does not by default increment the register address on consecutive writes. During normal operation it doesn't matter as all register accesses are done individually. At resume time after suspend, however, the regcache code gathers the biggest possible block of registers to sync and sends them one on one go. To fix this, set the INCR bit in all cases. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs4270.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 84f86745c30e9..828bc615a1908 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -643,6 +643,7 @@ static const struct regmap_config cs4270_regmap = { .reg_defaults = cs4270_reg_defaults, .num_reg_defaults = ARRAY_SIZE(cs4270_reg_defaults), .cache_type = REGCACHE_RBTREE, + .write_flag_mask = CS4270_I2C_INCR, .readable_reg = cs4270_reg_is_readable, .volatile_reg = cs4270_reg_is_volatile, -- 2.20.1