Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp328876ybg; Thu, 19 Mar 2020 00:06:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvxk/iUZfdnA/GBBdb2GiafBZ2G06217ES/+7FLSgI+1MWy7ANSrhEJpFZjySSFV+hvn40I X-Received: by 2002:aca:190f:: with SMTP id l15mr1256933oii.48.1584601569103; Thu, 19 Mar 2020 00:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584601569; cv=none; d=google.com; s=arc-20160816; b=XAOlvqIe1M2yGsYIvIvJX/OTCBSL/Izc+iAPBmrgJ/l/krr6yEaBMduZ5CAREJ4OgB ZIIjJsfmNmqBx6EZf4xr4feDrpf0eRuJxepJGnRI81WAAJbmIZAILtXk6PwoHoYOHaU6 28Kx/BU+b2Ti9XdDaZmKUPkPqLFC6B4TsSmjAUIts4iG4gOHbS1M0rgUIss5z04T37wF J4c95UcghvkB/RzIu0BXtrxeWDg9xp2sIMndPzyu+4cxU0EiAlyOqD3j4xlXYh9OT+ua JqBqsIC3IcbR2+JbHz7J8zRTvl0v+zjkNTzw/7CMuJZ33WJ6E4C6nQ1yU4ZSU6gZgoQB Z2rA== 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=0D+AJvH2z/GAu8jq4POlVkoS8vFQ7TIDkPK2ckVlMyA=; b=HuFH8PwycdOyWJcpJNB8gYzm+ZTA3d89TsCUInQJU1RYr9LcgVdtIMwYx4/virkgEs 6ZbLp1NVzmno5sikGh2XjpfL6HdTdJsTIjqU/wYsAcgBZzzHT+xJtYlMo+crcKxOzSpu oIiqXBDEKUdZjUkCg4XPVcuh/1Tl8I6dIRZCAlO5XX5XvrlVlEYo7ypdFczC0VyC1h0e EaYKQnjOZlNaNpGK4mO5lwdmrv5khxy9cfHLqfNbpYU4Ij6oI3lckftcuEzq/rvwYBEb eG8il503nFiYcmtjBD2MrTVU0hRias/OHftVvKtLzKgg/aG6p+2Ui0jPTGrWLYS/M1QA ROvg== 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 l20si825479otn.37.2020.03.19.00.05.54; Thu, 19 Mar 2020 00:06:09 -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 S1727196AbgCSHFT (ORCPT + 99 others); Thu, 19 Mar 2020 03:05:19 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:36913 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgCSHFT (ORCPT ); Thu, 19 Mar 2020 03:05:19 -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 1jEpEt-0006xW-F2; Thu, 19 Mar 2020 08:05:11 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jEpEs-0003lY-Ej; Thu, 19 Mar 2020 08:05:10 +0100 Date: Thu, 19 Mar 2020 08:05:10 +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: <20200319070510.gc6hr53gn7n2osvb@pengutronix.de> References: <20200317123231.2843297-1-oleksandr.suvorov@toradex.com> <20200317123231.2843297-3-oleksandr.suvorov@toradex.com> <20200317174344.GB1464607@ulmo> <20200317213056.futfiwn4qgr2njye@pengutronix.de> <20200318230539.GB2874972@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200318230539.GB2874972@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 On Thu, Mar 19, 2020 at 12:05:39AM +0100, Thierry Reding wrote: > On Tue, Mar 17, 2020 at 10:30:56PM +0100, Uwe Kleine-K?nig wrote: > > 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. > > That's exactly it. It's not sensible at all to use it. If you think the argument is "It is not sensible to be used." then please say so and don't add "PWM_POLARITY_NORMAL is not part of the DT ABI." which seems to be irrelevant now. > If you define it here it means people are allowed to do stuff like > this: > > pwms = <&pwm 1234 PWM_POLARITY_INVERTED | PWM_POLARITY_NORMAL>; > > which doesn't make sense. I would hope that a human reader would catch this. > What's more, it impossible for the code to even notice that you're > being silly because | PWM_POLARITY_NORMAL is just | 0 and that's just > a nop. I think this argument is a bad one. Whenever you introduce a function or symbol you can use it in a wrong way. With this argument you can also say GPIO_ACTIVE_LOW doesn't make sense because pwms = <&pwm 1234 GPIO_ACTIVE_LOW>; is silly. Keep well and fit, Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | https://www.pengutronix.de/ |