From patchwork Tue Sep 23 13:42:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 392519 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EE7931400B6 for ; Tue, 23 Sep 2014 23:43:51 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754877AbaIWNn1 (ORCPT ); Tue, 23 Sep 2014 09:43:27 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:54955 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508AbaIWNnZ (ORCPT ); Tue, 23 Sep 2014 09:43:25 -0400 Received: by mail-pa0-f44.google.com with SMTP id eu11so5735721pac.31 for ; Tue, 23 Sep 2014 06:43:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lEozwLvcO7bNvUEnZ/Q3I+ObY41wfYKuQp4W6V+Xm2I=; b=BklBYz/JSiTat6YfKbF1prvPjuSStaeVCqgl1KPDvAhwogAuF35wfLa+jSVZSdBjOn mjvictz3fOE0BFcbp4gRF82hN5FPN9C8FrQ1GF3FOKNlqMYl0SKhSSTdrWdardVcki5F Qe/y0Mn+PwAOpv+LfmKfWVAmvBbVm8zIE7nmP/joWqOu9mjuD8Vmd7YRA4hiURsBQXZn 68Zfo3VGIpS9kTS/lsxDMDJVCXJNqglgyrd/Ykuwm+Tr5pkH/t5phW+Tt5y1woRjGYjz f4pcIk+BP7lor3gd2wyQn2bwu48qht2BgPPhpMwlq0sbqSJCYTtPizQwSQunNMv2cZbV UAjw== X-Received: by 10.68.201.230 with SMTP id kd6mr34999819pbc.74.1411479804222; Tue, 23 Sep 2014 06:43:24 -0700 (PDT) Received: from localhost.localdomain ([69.176.84.147]) by mx.google.com with ESMTPSA id uj7sm2028964pac.4.2014.09.23.06.43.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 06:43:23 -0700 (PDT) From: Chris Zhong To: dianders@chromium.org, heiko@sntech.de Cc: linux-rockchip@lists.infradead.org, lee.jones@linaro.org, broonie@kernel.org, Chris Zhong , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/2] dt-bindings: add devicetree bindings for st-pwm regulator Date: Tue, 23 Sep 2014 21:42:59 +0800 Message-Id: <1411479779-10229-3-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1411479779-10229-1-git-send-email-zyw@rock-chips.com> References: <1411479779-10229-1-git-send-email-zyw@rock-chips.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the st-pwm regulator Signed-off-by: Chris Zhong Reviewed-by: Doug Anderson --- Changes in v5: Adviced by Mark Rutland - fix a spelling error Changes in v4: Adviced by Doug Anderson - remove regulator-always-on and regulator-boot-on from the Example Changes in v3: Adviced by Doug Anderson - update the Example Changes in v2: Adviced by Lee Jones - rename the documentation Adviced by Doug Anderson - update the example Adviced by Mark Rutland - remove pwm-reg-period .../bindings/regulator/pwm-regulator.txt | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/pwm-regulator.txt diff --git a/Documentation/devicetree/bindings/regulator/pwm-regulator.txt b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt new file mode 100644 index 0000000..c6756a9 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt @@ -0,0 +1,27 @@ +pwm regulator bindings + +Required properties: +- compatible: Should be "pwm-regulator" +- pwms: OF device-tree PWM specification (see PWM binding pwm.txt) +- voltage-table: voltage and duty table, include 2 merbers in each set of + brackets, first one is voltage(unit: uv), the next is duty(unit: percent) + +Any property defined as part of the core regulator binding defined in +regulator.txt can also be used. + +Example: + pwm_regulator { + compatible = "pwm-regulator; + pwms = <&pwm1 0 8448 0>; + + voltage-table = <1114000 0>, + <1095000 10>, + <1076000 20>, + <1056000 30>, + <1036000 40>, + <1016000 50>; + + regulator-min-microvolt = <1016000>; + regulator-max-microvolt = <1114000>; + regulator-name = "vdd_logic"; + };