Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp162739imu; Mon, 10 Dec 2018 18:33:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VKvCRMr/SLQKDWLP4BfCVC9jJ+Cq+NJtE+OQGuf2M17OdiVfEOjue2pEOpDNL4hfcZDXCy X-Received: by 2002:a17:902:5a5:: with SMTP id f34mr14435487plf.161.1544495624659; Mon, 10 Dec 2018 18:33:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544495624; cv=none; d=google.com; s=arc-20160816; b=NY8PsHuuUinypXYUwmRX8OkioU/URsokR61SdE/czXGaU5HXXXMxSF5/xm4S8jL5Ik lcpha0QJKbggNy5CtXFa1Zq1ZAEKR0am92MGmF1XKVeQjsPeuOCTP+/kBj3Npqp+di7G 4OvoBLzEtKKL4h71FZFDGEbqNeOT9G5AuhWv9lRcg9bDm5yr/rtkDHeO2dUh0lIGA+Ei NXjZ8xSxeoxarZCwyKqhxE6Rk2timIWQ2cILFgMz1eqVIUexKXB+cUwN1AdHj2GVt7oI pUBx1Luume7J6lwkBqwboxamAHjsVq7oDoJnLtnK1EWRtBC33Xnt+W9NvahDxuqLZrP2 qunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZdIZCn0Z+N0bI+7xIvRXkPlzixl7RiQZZ2uF4EiDXww=; b=h5d7JWfxCvSk7wloDFQHPa0WDTu49T/qabfiZukX1X+AAFzbs0W7r2WjvLWgr/DLHc 9WAVJmY4OyZ+VF8E4Tpz42+rGwZhQuYkUXdLc1e+1lrevcjx0mhEuAn5Jn1WParS2/X7 C2MXXYHGgVpVSMpTApdpyiac/dZY6MTiOALeoSBlw5z50yTpvy7O7/opBIsn7AgynO/8 ycl5Xyya/5ndM7ZRIHc3b3kx80/dzAy/Ep1LQFt6izXIHKvIoKmiblaI9U+XKoyPCGhz jqZgNTgxJRIP9tyEay6NEwG01dgPO1OOsWcPjbIQe+sSb2JpTCXeeOBGm1bXzkNScvBD PYpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si10324974pgc.580.2018.12.10.18.33.00; Mon, 10 Dec 2018 18:33:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbeLJXQ2 (ORCPT + 99 others); Mon, 10 Dec 2018 18:16:28 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36220 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbeLJXQ1 (ORCPT ); Mon, 10 Dec 2018 18:16:27 -0500 Received: by mail-oi1-f194.google.com with SMTP id x23so10501981oix.3; Mon, 10 Dec 2018 15:16:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ZdIZCn0Z+N0bI+7xIvRXkPlzixl7RiQZZ2uF4EiDXww=; b=onM9UL21lc8i9q1LyJ045cDfDvlq5lG+KBvo4feQxIsiV8RbqHPjIOwiJ1+9wT5UYE kaqACgtlJLjOeyuRKLclIBUF+wZnWgafiT8UUpfA/6unwhExNm5eDar+pRrRLAgU3bPA AiyROZpx2sqPkU638MDFUHb460/WzQHRqS+5rZfuwS9gCxcVKXiejIzbE/8mquZ50o76 la8qLz+hPIU09IoLQCTdeW4Wk77FXo6FBSAeF5XFFQj7QpC5cVaP7XoktCdbna2K7zuf EmrfEwvBJIOhqxVQ4YrspwSvZi99TE1fdpEuCTfL9QFLQvH3YTu1Ul7/PGHMsZ4sKDBe T+QQ== X-Gm-Message-State: AA+aEWY9DAH5efxh3hGnuDXl5NIooWvOa160j2LlTKwLS86k1S8eEvU/ tDb2Rh/90BG4IOhMkw2dJg== X-Received: by 2002:aca:5d57:: with SMTP id r84mr11623oib.243.1544483786696; Mon, 10 Dec 2018 15:16:26 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o2sm8688151otj.2.2018.12.10.15.16.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 15:16:25 -0800 (PST) Date: Mon, 10 Dec 2018 17:16:25 -0600 From: Rob Herring To: =?utf-8?B?Vm9rw6HEjQ==?= Michal Cc: Thierry Reding , Mark Rutland , "devicetree@vger.kernel.org" , "linux-pwm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lukasz Majewski , Fabio Estevam , Lothar =?iso-8859-1?Q?Wa=DFmann?= , Linus Walleij , =?utf-8?B?Vm9rw6HEjQ==?= Michal Subject: Re: [RFC PATCH v3 1/2] dt-bindings: pwm: imx: Allow switching PWM output between PWM and GPIO Message-ID: <20181210231625.GA30721@bogus> References: <1544103655-104466-1-git-send-email-michal.vokac@ysoft.com> <1544103655-104466-2-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1544103655-104466-2-git-send-email-michal.vokac@ysoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Dec 2018 13:41:30 +0000, =?utf-8?B?Vm9rw6HEjSBNaWNoYWw=?= wrote: > Output of the PWM block on i.MX SoCs is always low when the block is > disabled. This can cause issues when inverted PWM polarity is needed. > With inverted polarity a duty cycle = 0% corresponds to high level on > the output. Now, when PWM is disabled its output instantly goes low > which corresponds to duty cycle = 100%. > > To get a truly inverted PWM output two pinctrl states of the PWM pin > can be used. Configure the pin to GPIO function when PWM is disabled > and switch back to PWM function whenever non-zero duty cycle is needed. > > Signed-off-by: Michal Vokáč > --- > Changes in v3: > - Slightly different description of the pinctrl and pwm-gpio. > > Changes in v2: > - Do not use the "default" pinctrl state for GPIO. > - Use two new "pwm" and "gpio" pinctrl states. > - Add a new pwm-gpios signal. > > Documentation/devicetree/bindings/pwm/imx-pwm.txt | 49 +++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > Reviewed-by: Rob Herring