From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V4] pwm: lpc32xx - Add a driver for the motor PWM Date: Thu, 11 Sep 2014 11:39:44 +0200 Message-ID: <2979792.Ts9vlPSuLr@wuerfel> References: <1410363822-22151-1-git-send-email-alban.bedel@avionic-design.de> <3043402.gA1yIrlkCZ@wuerfel> <20140911103621.198f7ef6@avionic-0020> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <20140911103621.198f7ef6@avionic-0020> Sender: linux-pwm-owner@vger.kernel.org To: Alban Bedel Cc: Thierry Reding , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Grant Likely , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Roland Stigge List-Id: devicetree@vger.kernel.org On Thursday 11 September 2014 10:36:21 Alban Bedel wrote: > On Wed, 10 Sep 2014 18:28:39 +0200 > Arnd Bergmann wrote: > > > On Wednesday 10 September 2014 17:59:41 Alban Bedel wrote: > > > On Wed, 10 Sep 2014 17:51:36 +0200 > > > Arnd Bergmann wrote: > > > > > > > On Wednesday 10 September 2014 17:43:42 Alban Bedel wrote: > > > > > +- #pwm-cells: should be 3. See pwm.txt in this directory for a description of > > > > > + the cells format. The only third cell flag supported by this binding is > > > > > + PWM_POLARITY_INVERTED. > > > > > > > > If you don't have multiple pwm outputs or programmable period, I would say it > > > > should use #pwm-cells=<1> and only pass the polarity. > > > > > > There is 3 channel, so 3 PWM from the API POV, and the period is > > > independently programmable for each one. > > > > Then you should put the channel number into the first cell and the period > > length into the second cell, as the pwm.txt document says. > > That's what is implemented in this patch, by using > of_pwm_xlate_with_flags() for the .of_xlate callback. > Ah, my mistake. I misread the sentence in the binding for meaning that you only support the third cell. It's all good then. Arnd