From patchwork Wed Oct 4 14:17:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 14916 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp166824vqb; Wed, 4 Oct 2023 07:17:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvL4kOT4M/kN2DGGhIqgfyeuI7nt5o4BqRjZUdYrR7af/u+Y2fsW/Emal0ORY1FzSOQSpg X-Received: by 2002:a05:6a00:8c7:b0:68b:e710:ee9c with SMTP id s7-20020a056a0008c700b0068be710ee9cmr2866774pfu.19.1696429059612; Wed, 04 Oct 2023 07:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696429059; cv=none; d=google.com; s=arc-20160816; b=fnS+/+nghVQZlQ0haroIuRzYre3+ZZHMLz40o4kj97C/p6uUxEHbxBNYATVS6qnYkm Ok5bOLn9eFLnL0drussSAhrmXvUMN4eYXMw+ve4eXrwNzV0IMhTnFzs316Cnb2mllxag er2b+udNFd/9/JJ+BwU99kiNqlXB2BTQ8dlxZ3m/04D0EQeGNLRxR3MazBF1D6EkoBoh 757qivoxVQpMqB8AGgJKKQ4UXX0TAH2XS6N8rgQWVbQsyBitiS5cbqRuSjz0jrE4nZ9O gdnqQBA/8SQVfSCWJtyxTvGlyGBGMrvulMG75+sBLtJGzNfkLmw2Bnd7Y2gA9PKmN7lh SUbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=1udQNw5vCZHub2MtRBdFnqxAYq5T193WBJrN0AkjydA=; fh=6ROhvpJrsh+iZGjEACun9ZXYVgb1LMu8Jj3+nzwGyNE=; b=pSqE/0fg3F7PeCqOfAlYTZrkrp0Btc55SHE1kT5pxeIF7MwL9D8lrBpDlTMvFuzjS9 Lrqc09eKtstSf9hlgl/hfJhG6U0+z08iHWHJJ7p4SNf5/CSLJf9Di/GnkLA3DJKVwI5F D5DPKwMbrrnSFtNp+owyWxcB14oVXsqcvbqQCYLLVq6CmvZMDb/2y/lbTM5OF+S0/6EP qS0F3FPJiScgcmOhJfDXAv16nPGJJZVGwEMBs2CuXqJdAuNZxGqOwDWPoQuBo8qw07Gu OYeoaIgKHwKb7xWAXGJWKXNlNygJmRtyUYGcWvoqjTA3uKdYjGifNoUcCgDxVkjlzWcC hl+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=Vj8LdpYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e2-20020a637442000000b0056b024a4dd0si3658046pgn.614.2023.10.04.07.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=Vj8LdpYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 91EE9821A151; Wed, 4 Oct 2023 07:17:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242886AbjJDORg (ORCPT + 18 others); Wed, 4 Oct 2023 10:17:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242881AbjJDORb (ORCPT ); Wed, 4 Oct 2023 10:17:31 -0400 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8186BA1; Wed, 4 Oct 2023 07:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:From:References:In-Reply-To:Reply-To: Content-ID:Content-Description; bh=1udQNw5vCZHub2MtRBdFnqxAYq5T193WBJrN0AkjydA=; b=Vj8LdpYyntASnKF4i2mN+Jlltb 3CnKeISLlUzJJqDRytOuHKO63lH0TZsl6RoFwA1g9iZ3klX2OFI4go+0ZpR2xfHx4IA5cl2AuByko GqKXCXwvvKLae/lLCL3f16RcwvAFw+0czVdHajzAXcpdoT6Z4M0yiAqeWH8D6uAop/dS6yCYv4ojG h8fIUYzb24fOR8u8LmM9C5Z0tMHQ8YcWoZzLy6aNkumwBHKzykZnMGOeYZqHijJ9gAYg18Z8MOVLe pePHYFAo7PSTvyBe4XwmVWv7Td5M7m2BvfSaDBMPiR+/BXYlrzb3sfY3f03SXARYo0F2EJsbe3Sbu WLp9IalQ==; Received: from [10.22.3.24] (helo=serv1.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1qo2gj-0071hO-1A; Wed, 04 Oct 2023 16:17:21 +0200 From: Stephan Gerhold Subject: [PATCH RFC 0/2] regulator: qcom_smd: Disable unused regulators Date: Wed, 04 Oct 2023 16:17:16 +0200 Message-Id: <20231004-reg-smd-unused-v1-0-5d682493d555@kernkonzept.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOxzHWUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDAwMT3aLUdN3i3BTd0rzS4tQUXUvTpOQ0gxRTC7O0JCWgpoKi1LTMCrC B0UpBbs5KsbW1AK576KllAAAA To: Mark Brown Cc: Liam Girdwood , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stephan Gerhold , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 07:17:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778834797704786702 X-GMAIL-MSGID: 1778834797704786702 At the moment unused regulators managed by the RPM firmware on Qualcomm platforms stay on forever if they are already on during boot. This is because we have no way of checking if they are really on or not. Fix this by sending an explicit disable request for all unused regulators managed by the qcom_smd-regulator driver. I'm sending this as RFC mainly for the change in the regulator core. There is also a slight chance of breakage for incomplete device trees that mistakenly rely on having unused regulators always-on. Signed-off-by: Stephan Gerhold --- Stephan Gerhold (2): regulator: core: Disable unused regulators with unknown status regulator: qcom_smd: Disable unused regulators drivers/regulator/core.c | 9 +++++++-- drivers/regulator/qcom_smd-regulator.c | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) --- base-commit: f9a1d31874c383f58bb4f89bfe79b764682cd026 change-id: 20231004-reg-smd-unused-95bcf0d586fb Best regards,