Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp173465yba; Wed, 3 Apr 2019 06:43:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlWVNtSh6xVPth9z2ZhIn/U/2GztAnKCCUU6e9TPPKRVbRwU+hyYdd0X6FTsAlCLgR34Fm X-Received: by 2002:a63:e556:: with SMTP id z22mr38285139pgj.290.1554298993672; Wed, 03 Apr 2019 06:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554298993; cv=none; d=google.com; s=arc-20160816; b=loqRPlq993p+LH2IpgOqZZds/+AUstiqojNOQDPoK8I2zeUxYX+8SyAP9bWrEMdA43 c5C9ADQCD9oVbHxy1ZEIOoACnymjI/ZSZRS09ySbbRgVZO0D+0X5WDwTEnB9SG/sLLLt a9xgOjKkVQoKEFSqJRlNctoIf9cogmobbAr0VM+MMQv2IErjDbFn9/K8U9l3CtGFteYb EUV1GBgXiqz5iT9zLNxpb2IQxS4CQvCCZSf6St9Q3cx3n2dn3qMdSsXq6TMRdxksQtpR dv5YX3wzLJSNvJF3X4aSbjxUXZ/4VD3lKl3WWLhmppPcPHwqfvMcAbLmjBs/2HVBU3+Q 5z0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=V1N5qkQi7OQHl1lxUzLJv8MujHXYVmECwq2ib3QG8qo=; b=WMndDyNiXXZrFVk4z5REc00xI2N31bsTagFNcgRVxEZUGfcMswhDr5kN+h9RNI0C+f 1DKoTk9+Ujm24sFKbio7jVDmmqhVB1SQmULn5LW6+Ur1lyPd6AiwKKsb3x4SBXQcRNnK b9k3333PaDqklxY03rDjx7IvKS77WmNM+Rux6G2Dwr8PpeDPJRHnAm9GioYKVXpuivus AC8fUjxMWxn5Gr+ZZzgvFKKbmRo27IzWLz61MRLQ3vBovGu+V54RUlILdw2hXDpMRaUp RzKNBQg80PBUgG+T3aTD4QFAdBj+nMM1cihUNdxFh6hLpUgWevKfyUVeQp+BuHpbBpGW 350A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33si13446951pgb.99.2019.04.03.06.42.58; Wed, 03 Apr 2019 06:43:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726625AbfDCNmF (ORCPT + 99 others); Wed, 3 Apr 2019 09:42:05 -0400 Received: from regular1.263xmail.com ([211.150.70.199]:44446 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbfDCNmE (ORCPT ); Wed, 3 Apr 2019 09:42:04 -0400 Received: from sugar.zhang?rock-chips.com (unknown [192.168.167.12]) by regular1.263xmail.com (Postfix) with ESMTP id 38EA43A6; Wed, 3 Apr 2019 21:41:54 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P16332T140353604671232S1554298910639057_; Wed, 03 Apr 2019 21:41:53 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <4dd1d3b181e2437570de611833ce9e22> X-RL-SENDER: sugar.zhang@rock-chips.com X-SENDER: zxg@rock-chips.com X-LOGIN-NAME: sugar.zhang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Sugar Zhang To: heiko@sntech.de, broonie@kernel.org Cc: linux-rockchip@lists.infradead.org, Sugar Zhang , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 01/12] ASoC: rockchip: pdm: fix regmap_ops hang issue Date: Wed, 3 Apr 2019 21:40:45 +0800 Message-Id: <1554298856-59028-2-git-send-email-sugar.zhang@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> References: <1554298856-59028-1-git-send-email-sugar.zhang@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is because set_fmt ops maybe called when PD is off, and in such case, regmap_ops will lead system hang. enale PD before doing regmap_ops. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 400e29e..8a2e3bb 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -208,7 +208,9 @@ static int rockchip_pdm_set_fmt(struct snd_soc_dai *cpu_dai, return -EINVAL; } + pm_runtime_get_sync(cpu_dai->dev); regmap_update_bits(pdm->regmap, PDM_CLK_CTRL, mask, val); + pm_runtime_put(cpu_dai->dev); return 0; } -- 2.7.4