From patchwork Fri Jun 17 19:58:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 637284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rWWLM5lkZz9t0f for ; Sat, 18 Jun 2016 05:59:39 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b=Pxn2YDJd; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933196AbcFQT7Z (ORCPT ); Fri, 17 Jun 2016 15:59:25 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34925 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964842AbcFQT6h (ORCPT ); Fri, 17 Jun 2016 15:58:37 -0400 Received: by mail-pa0-f43.google.com with SMTP id hl6so31204206pac.2 for ; Fri, 17 Jun 2016 12:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wjK700ibbbRW5g77xtjFn1BTJ8cAeFeZ6bVJIGQps8Q=; b=Pxn2YDJd1Z3gxE6CrQZ0hZtKScsnkL/ll7ya3+9v4E7E81nFHNFfqN5B+ysL/WglRp RaftUPmfWBqgXRTOndiWLX7gxmlAKA+YV8CCLgnGnSQyWNwxTlEGilSKHgoL8kinzeXI 2XAvUDngptCgfjb8VfLIeauX9FhDWjkDq8/Kk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wjK700ibbbRW5g77xtjFn1BTJ8cAeFeZ6bVJIGQps8Q=; b=UTR4WZV2Do/wF0dMVKRbrvAs+Ja/SJ/2eiy8s89vRiv6uRsIgbR3ZO5I8br6npzil8 T2RqamVo9DtwS7vrp99hXC+tjhraxT1fuGiOL4F89/OVTwvbcjmK0c01OPqUo+Jnd6eV ZybFhsZwKCjmUkYyUsE0iCH0QHIXhChBuM1Inj+CiMX8P1kWfWMZ/5C5vbRLIw/TelyF U1o39QOxeVlMIWboJBm6QoI2cd2QQr0UCk3/gRTDTiv9xOf9o6I/ysu5W53KlBGHyFk9 fCwuGH0O0N8TwBLScTY2YeTyaTspzIjC2MZB3SJuP5zGh2AX09+gMoCmPBcW+0eJtYpK EVSA== X-Gm-Message-State: ALyK8tKf/1QQ1DEzpLuU7THu5mIKtD6gGdEYDiNxoH/I1c1EYdmAM410DBtZqa0serC2g744 X-Received: by 10.67.7.71 with SMTP id da7mr4160157pad.136.1466193516769; Fri, 17 Jun 2016 12:58:36 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id 144sm36181160pfu.83.2016.06.17.12.58.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Jun 2016 12:58:36 -0700 (PDT) From: Brian Norris To: Lee Jones , Thierry Reding , Olof Johansson Cc: , Doug Anderson , Brian Norris , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, Boris Brezillon , Stephen Barber , Javier Martinez Canillas , Benson Leung , Enric Balletbo , Randall Spangler , Shawn Nematbakhsh , Dmitry Torokhov , Todd Broch , Gwendal Grignou , Tomeu Vizoso , Brian Norris Subject: [PATCH v3 3/4] doc: dt: pwm: add binding for ChromeOS EC PWM Date: Fri, 17 Jun 2016 12:58:14 -0700 Message-Id: <1466193495-95801-4-git-send-email-briannorris@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466193495-95801-1-git-send-email-briannorris@chromium.org> References: <1466193495-95801-1-git-send-email-briannorris@chromium.org> Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org The ChromeOS Embedded Controller can support controlling its attached PWMs via its host-command interface. The number of supported PWMs varies on a per-board basis, but we can autodetect this by checking the error codes, so we don't need an extra property for this. And because the EC only allows specifying the duty cycle and not the period, we don't specify the period via pwm-cells, and instead have only support 1 cell -- to specify the index. Signed-off-by: Brian Norris Acked-by: Rob Herring --- v3: * add Rob's ack v2: dropped the "google,max-pwms" property --- .../devicetree/bindings/pwm/google,cros-ec-pwm.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt diff --git a/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt new file mode 100644 index 000000000000..472bd46ab5a4 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt @@ -0,0 +1,23 @@ +* PWM controlled by ChromeOS EC + +Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller +(EC) and controlled via a host-command interface. + +An EC PWM node should be only found as a sub-node of the EC node (see +Documentation/devicetree/bindings/mfd/cros-ec.txt). + +Required properties: +- compatible: Must contain "google,cros-ec-pwm" +- #pwm-cells: Should be 1. The cell specifies the PWM index. + +Example: + cros-ec@0 { + compatible = "google,cros-ec-spi"; + + ... + + cros_ec_pwm: ec-pwm { + compatible = "google,cros-ec-pwm"; + #pwm-cells = <1>; + }; + };