From patchwork Thu Nov 2 09:24:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 10038209 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 172B8603B5 for ; Thu, 2 Nov 2017 09:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10FA4285FB for ; Thu, 2 Nov 2017 09:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0565028627; Thu, 2 Nov 2017 09:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AC7E285FB for ; Thu, 2 Nov 2017 09:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755264AbdKBJYe (ORCPT ); Thu, 2 Nov 2017 05:24:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47892 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbdKBJYd (ORCPT ); Thu, 2 Nov 2017 05:24:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 626DA607CA; Thu, 2 Nov 2017 09:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509614673; bh=V1+ZhvzeylmLnqO3RVMLs0JHr5u/lTc8/v5y0Uzy6i4=; h=From:To:Cc:Subject:Date:From; b=HAnNOjxSE+crCwHF3Lwo94fOR5Bg+eNYSmRZ3oHI45VAhO0Dg68UCbuJk5BoFbaJy SKm5PLyrTAUt9bn4XtmwrSB8SIp0ygsoAws50jJ9+kdEbwugiqz1zesaEEDJMfAjCP D+c7PNeqVR19wAeKu6BS0hijY69b8iI0T1TBTCG0= Received: from blr-ubuntu-173.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 228216079E; Thu, 2 Nov 2017 09:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509614672; bh=V1+ZhvzeylmLnqO3RVMLs0JHr5u/lTc8/v5y0Uzy6i4=; h=From:To:Cc:Subject:Date:From; b=eAsioX0uPy37GEKRNOZEZIQjYLTWTnFokZ01hrWxBYpCQbLq5gi+1hiryMEPXHuEQ hzkzENWz2MBMA10O+zcWgSnFcggmSJtdjjtYFvF2SRjhbdDrtZs6MHG0khxzdbwBDU AF9H281E2gh20p3xHESZh0UzIMPsLeyqr884DOMk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 228216079E 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=rnayak@codeaurora.org From: Rajendra Nayak To: broonie@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-arm@lists.infradead.org, sboyd@codeaurora.org, Rajendra Nayak Subject: [PATCH] regulator: qcom_spmi: Add support for pmi8994 Date: Thu, 2 Nov 2017 14:54:00 +0530 Message-Id: <1509614640-7291-1-git-send-email-rnayak@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Document the regulators available on pmi8994 and add support for this PMIC to the SPMI PMIC regulator driver. Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Tested-by: Stephen Boyd --- .../devicetree/bindings/regulator/qcom,spmi-regulator.txt | 13 +++++++++++++ drivers/regulator/qcom_spmi-regulator.c | 9 +++++++++ 2 files changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt index 0fa3b0f..57d2c65 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt @@ -8,6 +8,7 @@ Qualcomm SPMI Regulators "qcom,pm8916-regulators" "qcom,pm8941-regulators" "qcom,pm8994-regulators" + "qcom,pmi8994-regulators" - interrupts: Usage: optional @@ -100,6 +101,15 @@ Qualcomm SPMI Regulators Definition: Reference to regulator supplying the input pin, as described in the data sheet. +- vdd_s1-supply: +- vdd_s2-supply: +- vdd_s3-supply: +- vdd_l1-supply: + Usage: optional (pmi8994 only) + Value type: + Definition: Reference to regulator supplying the input pin, as + described in the data sheet. + The regulator node houses sub-nodes for each regulator within the device. Each sub-node is identified using the node's name, with valid values listed for each @@ -122,6 +132,9 @@ pm8994: l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2 +pmi8994: + s1, s2, s3, l1 + The content of each sub-node is defined by the standard binding for regulators - see regulator.txt - with additional custom properties described below: diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 16c5f84..9f8eb5d 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1619,11 +1619,20 @@ static int spmi_regulator_of_parse(struct device_node *node, { } }; +static const struct spmi_regulator_data pmi8994_regulators[] = { + { "s1", 0x1400, "vdd_s1", }, + { "s2", 0x1700, "vdd_s2", }, + { "s3", 0x1a00, "vdd_s3", }, + { "l1", 0x4000, "vdd_l1", }, + { } +}; + static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators }, { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators }, + { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators }, { } }; MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);