From: Krzysztof Kozlowski <krzk@kernel.org>
To: Gokul Praveen <g-praveen@ti.com>,
j-keerthy@ti.com, vigneshr@ti.com, wbg@kernel.org,
linux-kernel@vger.kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org
Cc: u-kumar1@ti.com, n-francis@ti.com
Subject: Re: [PATCH 1/2] dt-bindings: counter: Add new ti,omap-dmtimer-cap compatible
Date: Tue, 7 Oct 2025 23:32:23 +0900 [thread overview]
Message-ID: <ea4f6245-631b-45b7-a432-a5c417c5a9ae@kernel.org> (raw)
In-Reply-To: <20fd5c31-eb37-4f48-9774-62a05f416bab@ti.com>
On 07/10/2025 18:49, Gokul Praveen wrote:
> Hi Krzysztof,
>
> On 07/10/25 15:09, Krzysztof Kozlowski wrote:
>> On 07/10/2025 18:23, Gokul Praveen wrote:
>>> Hi Krzysztof,
>>>
>>>
>>> On 07/10/25 12:05, Krzysztof Kozlowski wrote:
>>>> On 26/09/2025 18:06, Gokul Praveen wrote:
>>>>>>
>>>>>>> +
>>>>>>> + ti,timers:
>>>>>>> + description: Timer instance phandle for the Capture
>>>>>>
>>>>>> So the only resource is phandle? That's completely fake device then. NAK.
>>>>>>
>>>>>
>>>>>
>>>>> The OMAP Timer IP can operate in 3 modes: Timer, PWM mode or capture
>>>>> (mutually exclusive).
>>>>> The timer/ti,timer-dm.yaml file describes the timer mode of operation.
>>>>> It encapsulates base IP block and reg property is also part the same
>>>>> binding.
>>>>>
>>>>> This node represents the capture mode with phandle reference to the
>>>>> timer DT node. This is modeled all the same lines as how PWM
>>>>> functionality is implemented in pwm/ti,omap-dmtimer-pwm.yaml
>>>>
>>>> Different modes do not have their own device nodes. It is still one
>>>> device, so one device node.
>>>>
>>>>>
>>>>> Now, if this needs to change, please suggest alternate.
>>>>>
>>>>> One solution is perhaps to add a new property to ti,timer-dm.yaml itself
>>>>> to indicate the mode of IP?
>>>>
>>>> Not sure, depends what this really is and how it is used. I can also
>>>> imagine that consumer defines the mod of operation.
>>>>
>>>
>>> For a timer operating in capture mode, there are no consumers actually
>>> and the only way we use it is through sysfs.
>>>
>>> Would it be good enough if I have a separate "mode" property for the
>>> dmtimer device node just like how it is done for USB as follows where
>>> the usb device node has a "dr_mode" property to decide on whether the
>>> usb should act in host, device or otg mode.
>>
>>
>> No, because of all my other comments in previous email.
>>
>>
> Will having a separate sysfs property for enabling capture mode in
> dmtimer be a viable solution, which will then eliminate the need for a
> device tree property?
>
> It would be great to hear your feedback on this, krzysztof.
Could be, if this can be a runtime property. My questions and doubts are
indeed not a very clear guidance, partially because I don't know all use
cases for this hardware.
Lack of PWM consumer is already an indication for the driver to
configure it in other mode, for example.
But think rather why choice of mode would be board-level static
configuration. If you cannot answer that, then it should not be a DT
property most likely.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-10-07 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 8:00 [PATCH 0/2] Capture driver support for OMAP DM timer Gokul Praveen
2025-09-09 8:00 ` [PATCH 1/2] dt-bindings: counter: Add new ti,omap-dmtimer-cap compatible Gokul Praveen
2025-09-10 7:08 ` Krzysztof Kozlowski
2025-09-26 9:06 ` Gokul Praveen
2025-10-07 6:35 ` Krzysztof Kozlowski
2025-10-07 9:23 ` Gokul Praveen
2025-10-07 9:39 ` Krzysztof Kozlowski
2025-10-07 9:49 ` Gokul Praveen
2025-10-07 14:32 ` Krzysztof Kozlowski [this message]
2025-09-09 8:00 ` [PATCH 2/2] counter: ti-dmtimer-cap : capture driver support for OMAP DM timer Gokul Praveen
2025-09-09 14:58 ` Andrew Davis
2025-09-10 6:39 ` kernel test robot
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=ea4f6245-631b-45b7-a432-a5c417c5a9ae@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=g-praveen@ti.com \
--cc=j-keerthy@ti.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=n-francis@ti.com \
--cc=robh@kernel.org \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.com \
--cc=wbg@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).