From patchwork Tue May 22 12:07:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10418609 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 71FC06053B for ; Tue, 22 May 2018 12:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E60428BE2 for ; Tue, 22 May 2018 12:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F32428BEA; Tue, 22 May 2018 12:43:59 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 999FE28BE2 for ; Tue, 22 May 2018 12:43:58 +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=8ZHebBW8UJR3uMgh1tb2wq93toHBfZg7qoC1ig++Po0=; b=aSAfd/N6bjV+mO VpU72jvgfqoiflSFN6kOWH6VNT8Q+M9VbIjjOfEXIzLXMbSiAJgeRx1Z7x4Ky1DxzvkCX9UR6Iwlv jGkkFo0/taWKJ4FLIt2/9rQi2QXpE79EeWTUBYg1QgcZje0qmNOefTZTgJSMcgb+36zcqmn8gy/pv 9ODylDMGF5W5uNxmLr3NkGMYm9FKmPCJ93/HMX3Geu43+ZukPpZEM2m+pJCXrGUzy4WH14UoBimpJ Zl/tOjE8JW/w8pDXxLfzUCHFLRJJct+iSDNoDbMlu1MDf4m2x3PDaZuVUTR20R38RYP+h4RFKzIVu 6V43eU98f5lkjhRxV/ZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fL6dr-0005O7-BR; Tue, 22 May 2018 12:43:51 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fL6Vd-0005fb-By for linux-arm-kernel@bombadil.infradead.org; Tue, 22 May 2018 12:35:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=A9poasPQ4xtWCG45noO1DuT2RpfcB0m/yzPUwy3E35A=; b=NZ54ChWukHDhHP8vPM3aXv4oK V5Ov9tDPbsnezdrItCxHP/44OdpdHrjrjCaGM2/sKAZsPY9JrVtVRH4zfBGpUSSM1np9YG/ceOuSl +ZmRsIDTUGgDZtfi+kKtS/LPp8xXvgZKia1c+4wQy1ZCPOQzzk9+1Zxyw0XJuHvcEcy/6/USFkmBI /gq4KzbHvxHZJaK5x0IjPeCqBylKvUHMtNI20fdSrM8UMQIgKpvXud8lcMGpZS/hvPohz0G43z9jz DJ8+Ad2kU3JAekacfrBpz6+MQs1kR90/1IzPzxvyMcCNuIRqHepA2a/BEvVKmsLYTwiy6yNw6Conk eLNhyNgug==; Received: from esa6.microchip.iphmx.com ([216.71.154.253]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fL660-0006MZ-89 for linux-arm-kernel@lists.infradead.org; Tue, 22 May 2018 12:08:52 +0000 X-IronPort-AV: E=Sophos;i="5.49,430,1520924400"; d="scan'208";a="11781826" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 May 2018 05:08:41 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.352.0; Tue, 22 May 2018 05:08:40 -0700 From: Claudiu Beznea To: , , , , , , Subject: [PATCH v5 8/9] pwm: add documentation for pwm push-pull mode Date: Tue, 22 May 2018 15:07:12 +0300 Message-ID: <1526990833-30707-9-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526990833-30707-1-git-send-email-claudiu.beznea@microchip.com> References: <1526990833-30707-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-20180522_080852_449911_101181D5 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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 | 2 ++ Documentation/pwm.txt | 16 ++++++++++++++++ include/dt-bindings/pwm/pwm.h | 1 + 3 files changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt index 7c8aaac43f92..6a60c0fca112 100644 --- a/Documentation/devicetree/bindings/pwm/pwm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm.txt @@ -49,6 +49,8 @@ Optionally, the pwm-specifier can encode a number of flags (defined in - PWM_MODE_COMPLEMENTARY: PWM complementary working mode (for PWM channels with two outputs); if not specified, the default for PWM channel will be used +- PWM_MODE_PUSH_PULL: PWM push-pull working modes (for PWM channels with +two outputs); if not specified the default for PWM channel will be used Example with optional PWM specifier for inverse polarity and complementary mode: diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 912c43da8b48..675f9351fed1 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt @@ -128,6 +128,22 @@ channel that was exported. The following properties will then be available: PWML1 |__| |__| |__| |__| <--T--> + Push-pull mode - for PWM channels with two outputs; output waveforms + for a 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 diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h index b82279cc1787..cd4265bce968 100644 --- a/include/dt-bindings/pwm/pwm.h +++ b/include/dt-bindings/pwm/pwm.h @@ -12,5 +12,6 @@ #define PWM_POLARITY_INVERTED (1 << 0) #define PWM_MODE_COMPLEMENTARY (1 << 1) +#define PWM_MODE_PUSH_PULL (1 << 2) #endif