From patchwork Tue Jun 23 19:54:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 191597 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1365253ecs; Tue, 23 Jun 2020 14:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1cv7NJccf/Uw2Nt2Ytai0yElepbmh86c2pICj+XcoSzCckkU0nEmHWD1OPRtuVt8Vpxw7 X-Received: by 2002:a17:906:5283:: with SMTP id c3mr7830352ejm.22.1592947262204; Tue, 23 Jun 2020 14:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592947262; cv=none; d=google.com; s=arc-20160816; b=xBBx4oajIlC3OXPjvKMS29QdJT8ywBfFEggxSJ4Txa0hvzWgkMBu2yUwNX7ETwQV/4 +BycdD/mvXftUAdWjq3u4ZBWXn9KLZ/yC2gIKZGUP2I3cVrpz94ZwmKWhIl3kuM6snnd fOhYywwyrjFXTterAaDvvktT2X809zIkl41d8MrFeD/CQIjdLl4VhkH4YB9ddkd3dYKd Bm7DViEYeidMMvGGGU13YQFFBQ3qpR6goouG/aRpg5eA41XLKIP3FGCnHYTr82Jus2hF kY6OcqLeT3ryE9IBrclFGnd0fRxxHZK3TpB27UHL+Gr+YnvDAtmOfhqq147kyMH6MSD6 SWAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IjWt9B0TaL3yFxhOJeAG6TVbhLgA5NlKQaL3XUpwiT8=; b=kBIVvm9lF1/VY8fzUORiCBzjTt/B0R50ZK3dZgmlVPGUBmH9WeiNzuRV3cLAsV8qIz Rj/Z8q0nstTJmaP4fU3UelCkqplXst+K/9LkOukYFItx1bL/JkK4P7yLBmN+WvjbVwGE iV3cKnuGlkvWJZlVjVOxPcSpcCgkItSyCAzzqwOVUNxbQEEKM3Z4xxP1GqkrJ2NORVIP UNW35RCHII0XKTW1tEu0kTZxnNqxkrLErCxT6Z1crQJMMdydKFBRQmu4qGE4cUABB94E t873f5s7b2GwRRzQyizKHEhbBkWcZ4wP+ldQElG8fh9D6rB7v1DC4j5z6uPTDSBeZT5w oFlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ousVGEMz; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di25si11597227edb.539.2020.06.23.14.21.01; Tue, 23 Jun 2020 14:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ousVGEMz; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389759AbgFWUXS (ORCPT + 15 others); Tue, 23 Jun 2020 16:23:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390275AbgFWUXR (ORCPT ); Tue, 23 Jun 2020 16:23:17 -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 B102D206C3; Tue, 23 Jun 2020 20:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943797; bh=mNioKdiZlltvXFckGUJKJRkoWeOJS4WqiAurf6blrSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ousVGEMzW1NloDoJADaOt9V7LwBlm/L+6f1OmG6YjsmTIqeielKHe7Lnx7dGUOndL hRHukEZfcK6Vay6nhYVLx/oX5SgOBg6yFpye4QVa/ajzt8XiY8/nSUn+hnF7xYWTC4 18SzmL3iDr2l4EFlFtqJGggDJnCIrz2sG1+WxELg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Charles Keepax , Lee Jones , Sasha Levin Subject: [PATCH 5.4 054/314] mfd: wm8994: Fix driver operation if loaded as modules Date: Tue, 23 Jun 2020 21:54:09 +0200 Message-Id: <20200623195341.393311639@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit d4f9b5428b53dd67f49ee8deed8d4366ed6b1933 ] WM8994 chip has built-in regulators, which might be used for chip operation. They are controlled by a separate wm8994-regulator driver, which should be loaded before this driver calls regulator_get(), because that driver also provides consumer-supply mapping for the them. If that driver is not yet loaded, regulator core substitute them with dummy regulator, what breaks chip operation, because the built-in regulators are never enabled. Fix this by annotating this driver with MODULE_SOFTDEP() "pre" dependency to "wm8994_regulator" module. Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/wm8994-core.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 1e9fe7d92597e..737dede4a95c3 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -690,3 +690,4 @@ module_i2c_driver(wm8994_i2c_driver); MODULE_DESCRIPTION("Core support for the WM8994 audio CODEC"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mark Brown "); +MODULE_SOFTDEP("pre: wm8994_regulator");