From mboxrd@z Thu Jan 1 00:00:00 1970 From: Atish Patra Subject: Re: [RFC 1/4] pwm: sifive: Add DT documentation for SiFive PWM Controller. Date: Tue, 16 Oct 2018 15:42:00 -0700 Message-ID: References: <1539111085-25502-1-git-send-email-atish.patra@wdc.com> <1539111085-25502-2-git-send-email-atish.patra@wdc.com> <20181010135109.GE21134@ulmo> <20181016105103.GB8852@ulmo> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20181016105103.GB8852@ulmo> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Thierry Reding Cc: Wesley Terpstra , palmer@sifive.com, linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, hch@infradead.org List-Id: devicetree@vger.kernel.org On 10/16/18 3:51 AM, Thierry Reding wrote: > On Mon, Oct 15, 2018 at 03:45:46PM -0700, Atish Patra wrote: >> On 10/10/18 6:51 AM, Thierry Reding wrote: >>> On Tue, Oct 09, 2018 at 11:51:22AM -0700, Atish Patra wrote: >>> [...] >>>> +- interrupts: one interrupt per PWM channel (currently unused in the driver) >>> >>> This should probably say what the interrupt is used for. And once you >>> have that, remove the comment about it being unused in the driver. DT >>> is OS agnostic, so "driver" is very unspecific and your claim may >>> actually be false. >>> >>> Thierry >>> >> As per my understanding, they are generated by hardware but no usage of pwm >> interrupts as of now. > > It might be useful to say when they are generated. Are they generated > once per period? At the beginning or the end of the period? That kind > of thing. > Sure. I might have over simplified the statement above. I could only find this about pwm interrupts in spec. "The PWM can be configured to provide periodic counter interrupts by enabling auto-zeroing of the count register when a comparator 0 fires" I may be wrong here but it looks like we need to configure the hardware to generate periodic interrupts. I will confirm with Wesly and update it in v2. >> I am not sure if removing the entire entry is a good idea. >> What would be the best way to represent that information ? >> >> May be this ? >> >> +-interrupts: one interrupt per PWM channel. No usage in HiFive Unleashed >> SoC. > > Why do you think you need to say that they are unused? If the hardware > generates these interrupts, then they are "used". If no driver currently > has a use for them, that's driver specific and doesn't belong in the DT > bindings. > Sounds good. I will update accordingly. Regards, Atish > Thierry >