[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1de4293-a058-5e25-9be2-b61ac39f43a3@ti.com>
Date: Fri, 22 Apr 2022 10:37:12 +0530
From: Aswath Govindraju <a-govindraju@...com>
To: Roger Quadros <rogerq@...nel.org>
CC: Vignesh Raghavendra <vigneshr@...com>,
Kishon Vijay Abraham I <kishon@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sven Peter <sven@...npeter.dev>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Hector Martin <marcan@...can.st>,
Martin Kepplinger <martink@...teo.de>,
"Bryan O'Donoghue" <bryan.odonoghue@...aro.org>,
<linux-usb@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: usb: tps6598x: Make the interrupts
property optional
Hi Roger,
On 21/04/22 00:46, Roger Quadros wrote:
> Hi,
>
> On 18/04/2022 08:19, Aswath Govindraju wrote:
>> Hi Roger,
>>
>> On 14/04/22 23:40, Roger Quadros wrote:
>>> Hi,
>>>
>>> On 14/04/2022 11:31, Aswath Govindraju wrote:
>>>> Support for polling has been added in the driver, which will be used by
>>>> default if interrupts property is not populated. Therefore, remove
>>>> interrupts and interrupt-names from the required properties and add a note
>>>> under interrupts property describing the above support in driver.
>>>>
>>>> Suggested-by: Roger Quadros <rogerq@...nel.org>
>>>
>>> I did not suggest to make interrupts optional by default.
>>>
>>> What I suggested was that if a DT property exists to explicitly
>>> indicate polling mode then interrupts are not required.
>>>
>>
>> ohh okay, got it. However, may I know if adding a dt property to
>> indicate polling for aiding the driver, is the correct approach to model it?
>>
>> In terms of modelling hardware, as interrupts are not connected we are
>> not populating the interrupts property. Shouldn't that be all. If we are
>> adding a property explicitly to indicate polling that can be used by
>> driver, wouldn't that be a software aid being added in the device tree?
>
> The hardware (tps6598x chip) has an interrupt pin and is expected to be used
> in normal case.
>
> Some buggy boards might have forgot to connect it. We are adding polling mode only for these buggy boards. ;)
> So polling mode is an exception.
>
Yes as you mentioned the interrupt line is expected to connected but
there could be cases where there are not enough pins on the SoC and
polling is used intentionally. In these cases this would be a feature
rather than a bug.
Also, I feel like not adding interrupts property in the dt nodes will
indicate polling. My question is why are we adding an extra property
(which is being used only as an aid in the driver) when this feature can
be modeled by making interrupts property optional.
Thanks,
Aswath
> cheers,
> -roger
>
>>
>> Thanks,
>> Aswath
>>
>>>> Signed-off-by: Aswath Govindraju <a-govindraju@...com>
>>>> ---
>>>> Documentation/devicetree/bindings/usb/ti,tps6598x.yaml | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml
>>>> index a4c53b1f1af3..1c4b8c6233e5 100644
>>>> --- a/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml
>>>> +++ b/Documentation/devicetree/bindings/usb/ti,tps6598x.yaml
>>>> @@ -25,6 +25,8 @@ properties:
>>>>
>>>> interrupts:
>>>> maxItems: 1
>>>> + description:
>>>> + If interrupts are not populated then by default polling will be used.
>>>>
>>>> interrupt-names:
>>>> items:
>>>> @@ -33,8 +35,6 @@ properties:
>>>> required:
>>>> - compatible
>>>> - reg
>>>> - - interrupts
>>>> - - interrupt-names
>>>>
>>>> additionalProperties: true
>>>>
>>>
>>> cheers,
>>> -roger
--
Thanks,
Aswath
Powered by blists - more mailing lists