From patchwork Fri Jan 12 14:23:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10161181 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 13DFF60327 for ; Fri, 12 Jan 2018 14:42:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 020C4283F2 for ; Fri, 12 Jan 2018 14:42:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAD9528518; Fri, 12 Jan 2018 14:42:28 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A936A283F2 for ; Fri, 12 Jan 2018 14:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wb5CVZNhgDEQ3WWa7898vwJxIQPPFi/5J5S3+CybOuk=; b=uoZm3HPRZSSHUK rsjarihwNey1/cbhOpMxBAscal/r7JqX9V/80gh2/pNpCNAsV+gpCaXLOsseZOWpGbfOTDIJ975Hh KE425a/jIZNuQoBjLgQnjBfrm66lMX6ifCfIrURgk0xizBpDN518mwDm2wmzb+gQgtdHkyU2uTYvb 5D9RspEaDippcVjXVCF9fMfRP3HR/TPG7ObeWPBgHUzJVNroskohowE2CaXnyFs9FBF0o9zpi8uX0 O2Zgc0UIJs7CEMn/BjhrZK4Sm5G628futsfnfIZpqk5vg/BEP73nZJIDSEKM3ISyznLpd0nNuwxVs +BPZo0XqqYaGDVo5mDwg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ea0XB-0000Lq-Vg; Fri, 12 Jan 2018 14:42:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ea0Wr-0005qc-5h; Fri, 12 Jan 2018 14:41:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ubV4BhPPv5bTvaAOyOhtj7yaTCtdT2WPnXka7WOSoU8=; b=u7hHQ42ymIUIMO8SKedCfvOTz uv3nv6uGD5LNdledqiqaZWCr0SRcIJd+t2fWW1+yAHIHc198x8snwPzK+J0wfsXjL8gzxn9AyIVoa Nlvd9lrHBxtpPsdhBr8kpKgHrlehHr69+lGvVrcS+mpehJGktxHoxkVF5o6mMZEKvww4AkmLVcojC jC8xDqFwChH8kFVgn+SJuTh8SRk0O9mzK3g7GIoEpU5Ux2jJFpfbZFwkTPIu+6QW5bysFZBQ2li0T odnenQ8ChAaZZ7+mgHMDfsRFuX0WM6ULJnj7ETbNiJY3exzEHeFhO6Xd6QeQ6FZ2BB46qt2Tg+XBQ C+3MyYo7w==; Received: from esa2.microchip.iphmx.com ([68.232.149.84]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ea0G7-0001R0-8Z; Fri, 12 Jan 2018 14:24:41 +0000 X-IronPort-AV: E=Sophos;i="5.46,349,1511852400"; d="scan'208";a="10394913" Received: from exsmtp03.microchip.com (HELO email.microchip.com) ([198.175.253.49]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Jan 2018 07:24:32 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.76.4) by chn-sv-exch03.mchp-main.com (10.10.76.49) with Microsoft SMTP Server id 14.3.352.0; Fri, 12 Jan 2018 07:24:31 -0700 From: Claudiu Beznea To: , , , , , , , , , Subject: [PATCH v2 15/16] pwm: add documentation for pwm push-pull mode Date: Fri, 12 Jan 2018 16:23:02 +0200 Message-ID: <1515766983-15151-16-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515766983-15151-1-git-send-email-claudiu.beznea@microchip.com> References: <1515766983-15151-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180112_142439_596932_55E14858 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Claudiu Beznea , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add documentation for PWM push-pull mode. Signed-off-by: Claudiu Beznea Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pwm/pwm.txt | 8 +++++++- Documentation/pwm.txt | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt index fdff25bad1db..a4562af3577c 100644 --- a/Documentation/devicetree/bindings/pwm/pwm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm.txt @@ -58,15 +58,21 @@ Example with optional PWM specifier for inverse polarity - PWM_MODE_NORMAL: for all PWM controllers - PWM_MODE_COMPLEMENTARY: for PWM controllers with more than one output per PWM channel +- PWM_MODE_PUSH_PULL: for PWM controllers with more than one output per channel, +in push-pull mode Example with PWM modes: bl: blacklight { pwms = <&pwm 0 5000000 PWM_POLARITY_INVERTED - PWM_DTMODE_NORMAL | PWM_DTMODE_COMPLEMENTARY>; + PWM_DTMODE_NORMAL | PWM_DTMODE_COMPLEMENTARY | + PWM_DTMODE_PUSH_PULL>; pwm-names = "backlight"; }; +If all the available modes are given as argument of pwms binding only the first +valid one will be considered (first valid LSB bit of mode field). + 2) PWM controller nodes ----------------------- diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 58c9bd55f021..71b538239519 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt @@ -135,6 +135,24 @@ channel that was exported. The following properties will then be available: Where T is the signal period. + Push-pull mode - for PWM chips with mode than one output per PWM channel; + output waveform for a PWM controller with 2 outputs per PWM channel, in + push-pull mode, with normal polarity looks like this: + __ __ + PWMH __| |________| |________ + __ __ + PWML ________| |________| |__ + <--T--> + + If polarity is inversed: + __ ________ ________ + PWMH |__| |__| + ________ ________ __ + PWML |__| |__| + <--T--> + + Where T is the signal period. + Implementing a PWM driver -------------------------