Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp4212115ybh; Tue, 17 Mar 2020 14:31:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuFk/56HPCUKaEekBrv9hR1BhQVG74A0Ex7W0E7fFdaeO9qdOFdR52nxgB91/j4OZ8wTm/t X-Received: by 2002:a9d:73c7:: with SMTP id m7mr1142469otk.69.1584480711835; Tue, 17 Mar 2020 14:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584480711; cv=none; d=google.com; s=arc-20160816; b=1KVOnlDcmQ7rCjQNK1ynjvdJk8sX+Ft/xl1jbVbhZoYmoMpsw1qe7yFf/1Ay9rZVcW Ct7TZ7B1UY7ZuQ9FfwMHct7F1KVoTs+6o573o2EfYXF1o0X1OVkki9eh6AEXG3jrgaDg U6M3hDIWh8CoheOYjaB1jYH1XZlza+d5KAaMbyTeujSGD1uNy1KX54jvK4v/H+AGWOBO 53tAoMMv3gvbzslpWIzCCWIKuFB9YU7IZYzdh4EjSGsDEdl3YWXKHhAP1tVwJkumnGT+ GxVNeRxPB0/IbnVZ5a1aoGFo7qjzro/gyD7/nKzMrcX4ocnWmpYR7n7ffkzyKdII4eOX 33yQ== 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=ZZlk8OMdv7oqRvDwsodatKCxRT3vUMDzDn2gDe73r50=; b=vGiWBBKZhmKA9IN1prHftXKtwcbwPIf4qvdixQEn5gK/bTzfknQO3EMCGIoPQ2gtqs Iw1LK/kVhBxYKYHhl5VcHeO6k9rVjET7OOLehjarX+Y3anxSRxd7n7TCvEcfPl6d92Mp TFg+rz11FBTVCzeW+QhAWD0ZTn2Lz+uDEuJTpdUTVIp49W7B11OBCtDLCi0KtClIrcLp Frc8frSZzXLTmOMIrsMcym2cU4zBbV+1wQqFrFaGEm09rTAtU7SpYAu6r9BlXjLUUPI9 PznNLyaUH+S17Kd2/gQkMRvoJ1Oh/uL45Bdh6gg/O9XHy6+psVnA09adci7g/F63sntD N3nQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c201si2192142oib.57.2020.03.17.14.31.38; Tue, 17 Mar 2020 14:31:51 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbgCQVbM (ORCPT + 99 others); Tue, 17 Mar 2020 17:31:12 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:51551 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726494AbgCQVbL (ORCPT ); Tue, 17 Mar 2020 17:31:11 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEJnd-0005vE-6Z; Tue, 17 Mar 2020 22:30:57 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jEJnc-0004oR-3H; Tue, 17 Mar 2020 22:30:56 +0100 Date: Tue, 17 Mar 2020 22:30:56 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Thierry Reding Cc: Oleksandr Suvorov , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Paul Barker , Laurent Pinchart , Marcel Ziswiler , Igor Opaniuk , Philippe Schenker , Rob Herring , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/7] dt-bindings: pwm: document the PWM polarity flag Message-ID: <20200317213056.futfiwn4qgr2njye@pengutronix.de> References: <20200317123231.2843297-1-oleksandr.suvorov@toradex.com> <20200317123231.2843297-3-oleksandr.suvorov@toradex.com> <20200317174344.GB1464607@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200317174344.GB1464607@ulmo> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Thierry, On Tue, Mar 17, 2020 at 06:43:44PM +0100, Thierry Reding wrote: > On Tue, Mar 17, 2020 at 02:32:26PM +0200, Oleksandr Suvorov wrote: > > Add the description of PWM_POLARITY_NORMAL flag. > > > > Signed-off-by: Oleksandr Suvorov > > --- > > > > Documentation/devicetree/bindings/pwm/pwm.txt | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt > > index 084886bd721e..440c6b9a6a4e 100644 > > --- a/Documentation/devicetree/bindings/pwm/pwm.txt > > +++ b/Documentation/devicetree/bindings/pwm/pwm.txt > > @@ -46,6 +46,7 @@ period in nanoseconds. > > Optionally, the pwm-specifier can encode a number of flags (defined in > > ) in a third cell: > > - PWM_POLARITY_INVERTED: invert the PWM signal polarity > > +- PWM_POLARITY_NORMAL: don't invert the PWM signal polarity > > This doesn't make sense. PWM_POLARITY_NORMAL is not part of the DT ABI. "is not part of the DT ABI" is hardly a good reason. If it's sensible to be used, it is sensible to define it. (And as far as I understand it, the term PWM_POLARITY_INVERTED isn't part of the DT ABI either. Only the value 1 has a meaning (for some PWM controlers).) > The third cell of the specifier is a bitmask of flags. > > PWM_POLARITY_NORMAL is an enumeration value that evaluates to 0, so it > makes absolutely no sense as a flag. Using 0 or PWM_POLARITY_NORMAL doesn't have an effect on the compiled device tree, that's true. But having the term PWM_POLARITY_NORMAL (in contrast to a plain 0) in a dts file is useful in my eyes for human readers. > PWM signals are considered to be "normal" by default, so no flag is > necessary to specify that. GPIOs are considered to be active high by default, still there is GPIO_ACTIVE_HIGH (which also evaluates to 0). Also there is IRQ_TYPE_NONE. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | https://www.pengutronix.de/ |