Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1576483imm; Fri, 11 May 2018 19:29:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkTXXMTJ7tuVSeGrVdh7OkO/yTRZ7wo8NUS0u+m3vO4QjTsGrKtrsdhEJpDSv+uzyUs6aL X-Received: by 2002:a62:d605:: with SMTP id r5-v6mr1328344pfg.8.1526092173753; Fri, 11 May 2018 19:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526092173; cv=none; d=google.com; s=arc-20160816; b=Q7YHDLoiKY6bRvLqzFGaKZBQQvC6A4vDOVqFkVKJCS9AdtF71kjThiC9V9mliUWjlY yWwedt2X/d7m7rjBOUhqaeamFeTpxD/DwRP9iPYvGTNbnIZQCNowXsmAmFlxYorlYn3E OCpftnrqfu5Y7VnlX4JLjyQzW41Ot83LXaJeQ1dIZ/YQ6Ylh9yn7ULMODGVzcF1qDAz5 VEgsD4uFnRIq1/hK/QV/5i1uT97SBSx/3G57rdzauM2VUVrb99csIjx7tM19rpOHjCNf QoZzz9qY4/q0IrvyKq1AdXsqbVrSC054HEPOv7qLVi8PzageBHnTo6Kov+jc8alrS/eV /PHA== 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=0DxDlhMxiZit4jFJvPkMXY1fRHWOpaYTmwSOwBOb5a0=; b=EECYHPfqOFGvzyAnqe02C2BFRrf8Ky75k9J3O7aIhs1c3A1MSVtQmLZiwWlpzNc+54 faPBN1Nbh9cGyfeM5z5uBV6Q6cbBoDFhc3dofcigx56DsS9SHXei8RpNi/9PsjAW2gpZ HwAIeJPWuJppcfEP9CmeS+VqrmFRwoqO0BCB/cbB3oJGzgX2zkSXFlrXw+cEiJdXm4wX UvZhJkUDBcnx7V4GJOp+W/NitV4CAYop34vjRQxHTEJFZI8BTp93w9BG4tRl1jXzg836 oh3DHzblMSmMDECSC3Pk35rbSPSLrNy9Km2OFUA29XlnG2E5zzZ3FMCUzhsr97v8YKi0 Jkeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=AdRqjAxy; dkim=pass header.i=@codeaurora.org header.s=default header.b=jYoXS2U/; 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 c196-v6si3594143pga.494.2018.05.11.19.29.19; Fri, 11 May 2018 19:29:33 -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=AdRqjAxy; dkim=pass header.i=@codeaurora.org header.s=default header.b=jYoXS2U/; 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 S1751282AbeELC2R (ORCPT + 99 others); Fri, 11 May 2018 22:28:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34164 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbeELC2P (ORCPT ); Fri, 11 May 2018 22:28:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6544C6081B; Sat, 12 May 2018 02:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526092094; bh=FIVRmcSqYJR8R9HFeK5w/J7mC6wnnt0f1UDUhro+32g=; h=From:To:Cc:Subject:Date:From; b=AdRqjAxyciOhMW9DFChvdYjXk50XMBdx5lH/vJBA9esr0RW7AnbeWVSfUpA1otMwO UnHfN3BxjIFquEXbvYYIPnu+9nbg/92RvT0z5VCJiDx93nCdkz7FbXkSO2jmuoNfU1 /8ZeJap/z8oa3UGDD3wOQ8NsqlJAMvhg5OWEYev4= 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 BBB11601EA; Sat, 12 May 2018 02:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526092093; bh=FIVRmcSqYJR8R9HFeK5w/J7mC6wnnt0f1UDUhro+32g=; h=From:To:Cc:Subject:Date:From; b=jYoXS2U/vpwBCuwCKAm79jqeeqzrIJw7VtikiPcy9G8D+cziGbjl1c/+sDXYArs/Z Wr7eump8317D1SkDiPZXhUOkqz2eSyj4k+6VvKPHnu7otCGoCvSXgP/Qcbvut+eeUx N5BWzVoY/4uRe/nCM3b03+uB01Beg4h56ZQ1eYHs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BBB11601EA 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 v3 0/2] regulator: add QCOM RPMh regulator driver Date: Fri, 11 May 2018 19:28:04 -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 two recent of_regulator changes: [3] and [4]. Changes since v2 [5]: - 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 [6]: - 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://patchwork.kernel.org/patch/10348629 [4]: https://lkml.org/lkml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/4/13/687 [6]: 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 | 208 +++++ drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 925 +++++++++++++++++++++ .../dt-bindings/regulator/qcom,rpmh-regulator.h | 36 + 5 files changed, 1179 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