Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4820489ybl; Mon, 9 Dec 2019 17:33:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzyJZKzPwpCWLVIRYI3bDPcpTKNFc410aM2kcdsVSvdRjc9cwAqzuTwrI3RpxU12RoEa/Cu X-Received: by 2002:a05:6830:1d59:: with SMTP id p25mr24847414oth.308.1575941590411; Mon, 09 Dec 2019 17:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575941590; cv=none; d=google.com; s=arc-20160816; b=X1l0LIkiIgb2VxTGgd8HnF7Gsj4X5CjxH1/csvcmhG/8NGVXULlxLMGmWoWml3rzPv Zz+tp49gojBrcW+JU5Lj63/huFoPVtdOG7FS6/5kik1YciJ/8PFVD6lrh6X9o535t1rx IZVYvB9FpUiS1hhnSQqUaJwaZpAq+9Ka7JB3z5L0jpMDg6SVswa37iX4ZWCSh3ptGBVl CulSOlukXaj+w2CiIAjkMXjFN2FIoyvh0Q34rSPizQjCVl+TKyx/vsBm0ALq+ZT8axsF odHJwW5DYfcKLgACLs1dsRDQCTyNcVZ6tnL7TfL7YW2KaIVhrmrlZZhZTid+7SMLwZjM GoVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UqpJfCF3D37VJfuOPskNhpW2JeHH9pFB4KOKdtTwdyQ=; b=n/e+De2mjg8ctxYA9k7R4G1Z5lMbBuCXXSYU80eDnRri6sFIUs/oi4erW18iQCLDUA DN2XDA/59nds7667+IZfINZoEnrwKmvQ2plqn5BLcw3wDRfYscACwzX7jOKqHiNk1NVY ygngqKX6A0w4d02Egwg68fhzoUgwTdI8ZfSHvnMCN+l6yYypBs+0EwrnuD77CnOiUW/o Ajy6ibF6vuDbo+TuW7Y1N+PZJZ05qZaMdF3SLVDZLVOcHC4y7dvMbWdBsJc6wSfuxK4t yTx7AY3uJARooyOR22e4LZcKEjKzlPhXcwOHcHyhNIqFt+zHhT7cUBF+2lGAHl7hsaeA 2qqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bc1Zhe8i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si961353oti.61.2019.12.09.17.32.57; Mon, 09 Dec 2019 17:33:10 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bc1Zhe8i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbfLJBcY (ORCPT + 99 others); Mon, 9 Dec 2019 20:32:24 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:44939 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfLJBcY (ORCPT ); Mon, 9 Dec 2019 20:32:24 -0500 Received: by mail-ed1-f66.google.com with SMTP id cm12so14467960edb.11 for ; Mon, 09 Dec 2019 17:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UqpJfCF3D37VJfuOPskNhpW2JeHH9pFB4KOKdtTwdyQ=; b=bc1Zhe8iLIdRObEFSjlQQuOohVLEC8vKyYzA1AhMpnkg23ydBYOsTXGqxbFY2BnzZv sDJHcRuH1dvhGlYTlPEewsWKTo2ey87r/5x/TgaLjuTIdd98v3lyMyQ90PqM1ccoTEXM ez06WR/C+KGLRP5Kkh2nSd12PRi9jGaxnX7Q65kagz5nGUJxFc2j2cf33vOdjVgwCtsE SdeC3hWh4UqeV4QiaW7rfTJYI+mlbJ8V/4J7YDVC/EL4JK8XOZISzqQhgtbulLgWi+Ph X2sZAh3bFx7U1xwuf4u4XDsMeHYLQ4WXI/dOF2/7VmXvL9NXOo4AS3FMruNACmkup0PA LJYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UqpJfCF3D37VJfuOPskNhpW2JeHH9pFB4KOKdtTwdyQ=; b=HrCZ6rcc/wQJab/QMyfzjDyavB/VS3TJJX+ue2HmNTz36AJw0RGwtBn0pWHsJiAsTx 0q/j33FqaY6gRx9qSZt+JNjSle7BSGYsjaAHTGeShJ3m+bpAI6lD/t8Ak5oHZSD8Rzx8 O+ZPsJTKtpHmuvKcR/Kqg5bpJgrOw7HkmmoPTGZlQMYY+ZelyuryYBei7RdE0P/O0zFy GuihH+AVW/auEdPvKZxvqu65No4wp1hbyWfFobxX7hjx+Qux94jLEdRpmGwuYKAV8qIj YtofFiHbk6hoEF2gUpAmfmj/KBUioncvNEWLMb2wqcmdudML+l1EESVeuVCw0k4utH77 ENzQ== X-Gm-Message-State: APjAAAXaKDww5t7HQFMTbIwF39Iz9SbisFhhjyGaWsVEt0tWxD2GIH4F juaAGwbAUYsMdxRqyVifg2nfwoGfsDgKZhEeTH8= X-Received: by 2002:aa7:d345:: with SMTP id m5mr36626481edr.149.1575941542654; Mon, 09 Dec 2019 17:32:22 -0800 (PST) MIME-Version: 1.0 References: <20191206075209.18068-1-hslester96@gmail.com> <20191209162417.GD5483@sirena.org.uk> <20191209170030.GH5483@sirena.org.uk> In-Reply-To: <20191209170030.GH5483@sirena.org.uk> From: Chuhong Yuan Date: Tue, 10 Dec 2019 09:32:12 +0800 Message-ID: Subject: Re: [PATCH] ASoC: cs42l42: add missed regulator_bulk_disable in remove and fix probe failure To: Mark Brown Cc: Brian Austin , Paul Handrigan , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , James Schulman , alsa-devel@alsa-project.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 1:00 AM Mark Brown wrote: > > On Tue, Dec 10, 2019 at 12:52:30AM +0800, Chuhong Yuan wrote: > > > I have a question that what if CONFIG_PM is not defined? > > Since I have met runtime PM before in the patch > > a31eda65ba21 ("net: fec: fix clock count mis-match"). > > I learned there that in some cases CONFIG_PM is not defined so runtime PM > > cannot take effect. > > Therefore, undo operations should still exist in remove functions. > > There's also the case where runtime PM is there and the device is active > at suspend - it's not that there isn't a problem, it's that we can't > unconditionally do a disable because we don't know if there was a > matching enable. It'll need to be conditional on the runtime PM state. How about adding a check like #ifndef CONFIG_PM? I use this in an old version of the mentioned patch. However, that is not accepted since it seems not symmetric with enable in the probe. But I don't find an explicit runtime PM call in the probe here so the revision pattern of ("net: fec: fix clock count mis-match") seems not applicable. So I think adding a check is acceptable here, at least it solves the problem.