Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp23280imm; Mon, 4 Jun 2018 12:18:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIVTOWdhl7RaOfLi0sfXE69zIjA5FX7L9A3Wq+QrOuLPbVlby0gTRCDYCRXu6yVVFJUXWSi X-Received: by 2002:a17:902:563:: with SMTP id 90-v6mr23505578plf.327.1528139917813; Mon, 04 Jun 2018 12:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528139917; cv=none; d=google.com; s=arc-20160816; b=N0QioFLuh7R3NB+Xzbfmf1/b/WAi10bpswYMMeoUbV6PQq8aF50HvXkGepi9+8vDX4 iOMhoZwe8JHpG1WnabGzaPPylHcGzaeEhFBPKcJ0gAhjZZAvBnp070xdeeavLjoSoTMD PwcdH0/jprSKRElW08rl3QHuFPo1lLWV2wvt4Ji3KFRxG1L5erHCLB5++K/lcKLN12cB viLXe7WLvCfL3extv9J9mz3MvIAnuRcJnVRf+UccgUolwRI9GmoGLYXvXa0oArr0Kt9o LUm0oyQCF3Gr2VqRQBhIpRr3mZVCskrrp+siRoyCwReDLgOl9RWcJiyrApbSUxn4gKAW 8Wkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=2oSwEn4ZSi7QWNxiXe1PkXglqBHeJQvtxnt9eaVTjlM=; b=WC4013S+4Hk88QmnsHnqGAAV9VupoI6Ay5O0ecuQIZGUYCx4dkM27C5fLx/A6jNjQt tZ0f/Naj8XHTnvRoRwbfRPkCrkCuru9q6UQlNom8QGN1bx4EOPQk64efI4UMyJqjysuR S7ExeHCl9K7CSH4UKQnBRoONjYnJu6UAMcRfVY+Czh4orI2SPPT1dKXue4WX2hoPyk6q ZbqGg7ImwVTSs918nuyzAhCNRd5BS9OmXXC9zqSdK5FRYCK99+h5Ae1/WT2PHpTNsvJK Z8XPdUF9fTKB6UZc3/dfdcqX7HfbCxVqJpG/j/zOPCEyYFmJmOF1GvyNu9Yk0pa4nMNb T8Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SQGkO9RU; dkim=pass header.i=@codeaurora.org header.s=default header.b=Hu7Fhyyy; 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 d11-v6si47898227pfh.131.2018.06.04.12.18.22; Mon, 04 Jun 2018 12:18:37 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=SQGkO9RU; dkim=pass header.i=@codeaurora.org header.s=default header.b=Hu7Fhyyy; 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 S1751135AbeFDTQo (ORCPT + 99 others); Mon, 4 Jun 2018 15:16:44 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40394 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbeFDTQl (ORCPT ); Mon, 4 Jun 2018 15:16:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 42949607B4; Mon, 4 Jun 2018 19:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528139801; bh=zb4MpPHvIYs/XTkjRnhQ9rzJR6nicpQ1Vp6G5UWV9tM=; h=From:To:Cc:Subject:Date:From; b=SQGkO9RUHmJxxldbNVVkSsr2cWLIGTSz3v6WgMVykWPnHQuNz9GYfQNm0Qy+Wzp7C ewIHzP5IAQmbknATn2v1vfoJfmZRqd4aq0aFWVkIaqmWL9LjvY24azpdTKLMUKs9C0 9VvgnCNegT3gQQxIOqR32VrgHYp8B3Enh3Oxdil0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: collinsd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E1F21606DD; Mon, 4 Jun 2018 19:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528139800; bh=zb4MpPHvIYs/XTkjRnhQ9rzJR6nicpQ1Vp6G5UWV9tM=; h=From:To:Cc:Subject:Date:From; b=Hu7FhyyyE0s2Zd14hSHpvuLcUpf5Ls7Ec6Gz3NKjDY9I/ho8Olv5sPGp/061UYRsV pKoITfAVNAPbhU0nGRB9fxV//bTzjiZASpQHEUhv6wqHOTR2a3He/JE41c8bozG1v5 HU9nGY+q7C5qVIulkMgAbBrd22ztkoRAzAKDCaeM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E1F21606DD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=collinsd@codeaurora.org From: David Collins To: broonie@kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: David Collins , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, rnayak@codeaurora.org, sboyd@kernel.org, dianders@chromium.org Subject: [PATCH v6 0/2] regulator: add QCOM RPMh regulator driver Date: Mon, 4 Jun 2018 12:15:10 -0700 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds a driver and device tree binding documentation for PMIC regulator control via Resource Power Manager-hardened (RPMh) on some Qualcomm Technologies, Inc. SoCs such as SDM845. RPMh is a hardware block which contains several accelerators which are used to manage various hardware resources that are shared between the processors of the SoC. The final hardware state of a regulator is determined within RPMh by performing max aggregation of the requests made by all of the processors. The RPMh regulator driver depends upon the RPMh driver [1] and command DB driver [2] which are both still undergoing review. It also depends upon three recent regulator changes: [3], [4], and [5]. Changes since v5 [6]: - Removed unused constants - Added Reviewed-by tag for DT patch 1/2 Changes since v4 [7]: - Removed support for DT properties qcom,regulator-drms-modes and qcom,drms-mode-max-microamps - Specified fixed DRMS high power mode minimum limits for LDO type regulators - Removed DRMS support for SMPS and BOB type regulators - Simplified voltage caching logic Changes since v3 [8]: - Removed support for DT properties qcom,regulator-initial-microvolt and qcom,headroom-microvolt - Renamed DT property qcom,allowed-drms-modes to be qcom,regulator-drms-modes - Updated DT binding documentation to mention which common regulator bindings can be used for qcom-rpmh-regulator devices - Added voltage caching so that voltage requests are only sent to RPMh after the regulator has been enabled at least once - Changed 'voltage_selector' default value to be -ENOTRECOVERABLE to interact with [5] - Initialized 'enabled' to -EINVAL so that unused regulators are disabled by regulator_late_cleanup() - Removed rpmh_regulator_load_default_parameters() as it is no longer needed - Updated the mode usage description in qcom,rpmh-regulator.h Changes since v2 [9]: - Replaced '_' with '-' in device tree supply property names - Renamed qcom_rpmh-regulator.c to be qcom-rpmh-regulator.c - Updated various DT property names to use "microvolt" and "microamp" - Moved allowed modes constraint specification out of the driver [4] - Replaced rpmh_client with device pointer to match new RPMh API [1] - Corrected drms mode threshold checking - Initialized voltage_selector to -EINVAL when not specified in DT - Added constants for PMIC regulator hardware modes - Corrected type sign of mode mapping tables - Made variable names for mode arrays plural - Simplified Kconfig depends on - Removed unnecessary constants and struct fields - Added some descriptive comments Changes since v1 [10]: - Addressed review feedback from Doug, Mark, and Stephen - Replaced set_voltage()/get_voltage() callbacks with set_voltage_sel()/ get_voltage_sel() - Added set_bypass()/get_bypass() callbacks for BOB pass-through mode control - Removed top-level PMIC data structures - Removed initialization variables from structs and passed them as function parameters - Removed various comments and error messages - Simplified mode handling - Refactored per-PMIC rpmh-regulator data specification - Simplified probe function - Moved header into DT patch - Removed redundant property listings from DT binding documentation [1]: https://lkml.org/lkml/2018/5/9/729 [2]: https://lkml.org/lkml/2018/4/10/714 [3]: https://lkml.org/lkml/2018/4/18/556 [4]: https://lkml.org/lkml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/5/15/1005 [6]: https://lkml.org/lkml/2018/6/1/895 [7]: https://lkml.org/lkml/2018/5/22/1168 [8]: https://lkml.org/lkml/2018/5/11/701 [9]: https://lkml.org/lkml/2018/4/13/687 [10]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2): regulator: dt-bindings: add QCOM RPMh regulator bindings regulator: add QCOM RPMh regulator driver .../bindings/regulator/qcom,rpmh-regulator.txt | 160 +++++ drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 767 +++++++++++++++++++++ .../dt-bindings/regulator/qcom,rpmh-regulator.h | 36 + 5 files changed, 973 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt create mode 100644 drivers/regulator/qcom-rpmh-regulator.c create mode 100644 include/dt-bindings/regulator/qcom,rpmh-regulator.h -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project