From: Aswath Govindraju <a-govindraju@ti.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Roger Quadros <rogerq@kernel.org>,
Rob Herring <robh+dt@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sven Peter <sven@svenpeter.dev>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Hector Martin <marcan@marcan.st>,
Martin Kepplinger <martink@posteo.de>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
<linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: usb: tps6598x: Make the interrupts property optional
Date: Mon, 2 May 2022 11:00:44 +0530 [thread overview]
Message-ID: <f714ee55-ef47-317d-81b9-57020dda064b@ti.com> (raw)
In-Reply-To: <YmeXw8nerjpuKPC9@kuha.fi.intel.com>
Hi Rob,
On 26/04/22 12:27, Heikki Krogerus wrote:
> On Tue, Apr 26, 2022 at 09:42:31AM +0300, Roger Quadros wrote:
>> Hi,
>>
>> On 22/04/2022 08:07, Aswath Govindraju wrote:
>>> 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@kernel.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.
>>
>> I do not agree that this is a feature but a board defect. You can always use
>> a GPIO expander to add more GPIOs than the SoC can provide.
>>
>> Type-C events are asynchronous and polling is a waste of CPU time.
>> What will you do if system suspends and you need to wake up on Type-C
>> status change?
>> So polling mode is just an exception for the defective boards or could
>> be used for debugging.
>>
>>>
>>> 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.
>>
>> Because interrupt property was not originally optional for this driver.
>>
>> I would like to hear what Heikki has to say about this.
>>
>> Any thoughts Heikki?
>
> I think the question is generic. How should DT describe the
> connection/lack of connection? Rob should comment on this.
>
A gentle ping regarding this.
Thanks,
Aswath
> thanks,
>
>
>> cheers,
>> -roger
>>
>>>
>>> Thanks,
>>> Aswath
>>>
>>>> cheers,
>>>> -roger
>>>>
>>>>>
>>>>> Thanks,
>>>>> Aswath
>>>>>
>>>>>>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.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
>>>
>>>
>
next prev parent reply other threads:[~2022-05-02 5:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 8:31 [PATCH 0/2] typec: tipd: Add support for polling Aswath Govindraju
2022-04-14 8:31 ` [PATCH 1/2] dt-bindings: usb: tps6598x: Make the interrupts property optional Aswath Govindraju
2022-04-14 18:10 ` Roger Quadros
2022-04-18 5:19 ` Aswath Govindraju
2022-04-20 19:16 ` Roger Quadros
2022-04-22 5:07 ` Aswath Govindraju
2022-04-26 6:42 ` Roger Quadros
2022-04-26 6:57 ` Heikki Krogerus
2022-05-02 5:30 ` Aswath Govindraju [this message]
2022-06-09 5:33 ` Aswath Govindraju
2022-04-14 8:31 ` [PATCH 2/2] usb: typec: tipd: Add support for polling interrupts status when interrupt line is not connected Aswath Govindraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f714ee55-ef47-317d-81b9-57020dda064b@ti.com \
--to=a-govindraju@ti.com \
--cc=alyssa@rosenzweig.io \
--cc=bryan.odonoghue@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=martink@posteo.de \
--cc=robh+dt@kernel.org \
--cc=rogerq@kernel.org \
--cc=sven@svenpeter.dev \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®