From patchwork Sun Sep 28 02:28:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 394139 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 5AC55140188 for ; Sun, 28 Sep 2014 12:29:47 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753553AbaI1C3Z (ORCPT ); Sat, 27 Sep 2014 22:29:25 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:50609 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbaI1C3W (ORCPT ); Sat, 27 Sep 2014 22:29:22 -0400 Received: by mail-pd0-f175.google.com with SMTP id v10so13983056pde.6 for ; Sat, 27 Sep 2014 19:29:21 -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=V8e+4gmmZ3ZEK8fco86M8Ke+28ACEfYrrr4tI3JOz4c=; b=HaBXW6yYFqVKuduxt2g1hkRIoHFBbls7/yqGXV2RZBov3+i05oeLiK7JRcgP3jVJdm 2lE8PqSsGz4h/VU6NLEWt6FKhKwMbbSJ2Aai7ry97f8h/G4QMrcSpQYHK+9E5DmblLKU cMfO1GUnkc+r7vteQWKcYcLx8hQEkOOwYCyojpTnSo8+s77ADhr1sPv+ZXFQVWL22r1A izjx9ti6PuUqVTQ6YiF41Ngio4Flt/g/YfimNxbo2ODEuVSUkc3gYHgdb+YXFDdYfYsH FepCd6jLzEHl7hJyq2NsUJuOpFF8OyN3/EAYYGDa3yZ5obt0HbUZLJZ5l3nXOhMaR6mX nTNQ== X-Received: by 10.66.221.163 with SMTP id qf3mr45466758pac.37.1411871361789; Sat, 27 Sep 2014 19:29:21 -0700 (PDT) Received: from localhost.localdomain (119.81.172.66-static.reverse.softlayer.com. [119.81.172.66]) by mx.google.com with ESMTPSA id p1sm8646815pdr.15.2014.09.27.19.29.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Sep 2014 19:29:20 -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 v7 2/2] dt-bindings: add devicetree bindings for pwm regulator Date: Sun, 28 Sep 2014 10:28:54 +0800 Message-Id: <1411871334-17692-3-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1411871334-17692-1-git-send-email-zyw@rock-chips.com> References: <1411871334-17692-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 pwm regulator Signed-off-by: Chris Zhong Reviewed-by: Doug Anderson --- Changes in v7: - re-edit changelog Changes in v6: 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..ce91f61 --- /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 members 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"; + };