Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp580798ybg; Thu, 19 Mar 2020 05:12:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vse55MMKgWoUpqwyqBVOcz0eE1iweJjua/BtMqncl/CA/e5QmgWY+aK15sOMah3+W1i0BMd X-Received: by 2002:aca:a94a:: with SMTP id s71mr1967143oie.152.1584619950410; Thu, 19 Mar 2020 05:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584619950; cv=none; d=google.com; s=arc-20160816; b=ojdJRHhfb2SKgwP12tAAWXfj+g0cDkicXSp9XnFoc0B0KPmnCEHmPgSg06xDtoVm72 7REux/yx4LZL97hxpP429HNB/eM/USjaC+Lk9x2r9CANtob0+oQLntIuhjEp+jbNlPQF BBhRT8HmjxO2x1C/3oJon6M+ZkP6OiEyx/zxQyhFjEvPBQ8TtYH7TmqQqSSy1HzLsH1u 57J7fLkjFjCTKKNMiBm9bhyNWDFyvV1MjKMMgRVyi30i9iXaceb/ErSHcjggosWpAwxA A3lp4auxgbBUAj1AfC1npHNHV306Emh8dwbVgC3t1ESK0Y/oqgsyNuFpvRuPijdJJyhQ A1Iw== 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=0p87ZJN1QHbM51zdR5CXEGxyZoN6gAWE6joWuEbzvHQ=; b=I6Witv5PrbIQ6U9yKca57X9KAg2sosbcDTRmYviOe45aym/UlQWdrQ+ZDFRdQZOC5M jkcpd0qDCZqTfIlf+htMgedIy4uJJIvZjEBKBxJ1DZ8lT4NGJ5OH6AmTJhoaKEwh1kg6 lAFjvUcyCYm6AKW0pgYUzU7oFg9Gg0PONNE/xxfB1t5csa1enUcgUIn8OMh9UW0iXGoQ DXjl2ZW+K1Z08CoKLaZF0GtaQeixe+yUyYCQmiDxX/vBHJ6TEHSa4P5ed+o8R3mI7ycr /pqKy4eey2L6oWrPFjPq5EGPD/Edx2fEtbLTP4wX7Dw1QLKU6St+9KRl7m4ZqkqyrjOs krmQ== 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 e5si1165441otp.317.2020.03.19.05.12.03; Thu, 19 Mar 2020 05:12:30 -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 S1727138AbgCSMK7 (ORCPT + 99 others); Thu, 19 Mar 2020 08:10:59 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:42311 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbgCSMK6 (ORCPT ); Thu, 19 Mar 2020 08:10:58 -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 1jEu0L-0007Yc-KU; Thu, 19 Mar 2020 13:10:29 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jEu0I-0006oX-6J; Thu, 19 Mar 2020 13:10:26 +0100 Date: Thu, 19 Mar 2020 13:10:26 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Oleksandr Suvorov Cc: Thierry Reding , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Paul Barker , Laurent Pinchart , Marcel Ziswiler , Igor Opaniuk , Philippe Schenker , Alexandre Belloni , Chen-Yu Tsai , Claudiu Beznea , Fabio Estevam , Florian Fainelli , Heiko Stuebner , Kevin Hilman , Ludovic Desroches , Maxime Ripard , NXP Linux Team , Nicolas Ferre , Palmer Dabbelt , Paul Cercueil , Paul Walmsley , Pengutronix Kernel Team , Ray Jui , Sascha Hauer , Scott Branden , Shawn Guo , bcm-kernel-feedback-list@broadcom.com, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [RFC PATCH 1/7] pwm: rename the PWM_POLARITY_INVERSED enum Message-ID: <20200319121026.3rzcxdknfyhtkryi@pengutronix.de> References: <20200317123231.2843297-1-oleksandr.suvorov@toradex.com> <20200317123231.2843297-2-oleksandr.suvorov@toradex.com> <20200317174043.GA1464607@ulmo> <20200317210042.ryrof3amr7fxp4w5@pengutronix.de> <20200318225953.GA2874972@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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, [dropping Tony Prisk from recipients] On Thu, Mar 19, 2020 at 01:40:28PM +0200, Oleksandr Suvorov wrote: > Thierry, I see the PWM core converts the bit field "third cell" into > the polarity variable. > Now I probably understand your sight and agree that we shouldn't give > the same names to bits in bitfield (dts) and values of a variable. > > But there are lots of useless "0" values of third cell of "pwms" > option in dts files. > > I see 2 ways now: > - just remove all "0" "third cell" from "pwms" options in dts files. I > see this "0" confuses some people. Then you have to overwrite pwm-cells of the provider. If there are two PWMs used from the same provider and only one is inverted this won't work. (Not entirely sure I understood your suggestion.) So I don't like this suggestion. And also in my eyes this isn't clearer, just more complicated to use. > - convert pwm_state.polarity into pwm_state.flags and use bitfield > directly from dtb. > It simplifies the parsing logic and makes adding new flags easier. *shrug*, I don't care much. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | https://www.pengutronix.de/ |