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: 859947 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zJ4lN3jC6z9s7g for ; Sat, 13 Jan 2018 01:25:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964882AbeALOYf (ORCPT ); Fri, 12 Jan 2018 09:24:35 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:45456 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964879AbeALOYd (ORCPT ); Fri, 12 Jan 2018 09:24:33 -0500 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: , , , , , , , , , CC: , , , , , , , Claudiu Beznea 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 -------------------------