mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vankar, Chintan" <c-vankar@ti.com>
To: Rob Herring <robh@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Peter Rosin <peda@axentia.se>, <s-vadapalli@ti.com>,
	<danishanwar@ti.com>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>
Subject: Re: [RFC PATCH v2 1/2] devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for new property
Date: Thu, 6 Mar 2025 04:00:37 +0530	[thread overview]
Message-ID: <b6fdfe6e-dbd3-4dc8-acf2-f2983f150df1@ti.com> (raw)
In-Reply-To: <CAL_JsqLb5hrYD_-dqW5ELtbXohd8a1UL7nOuP2a9ZhE+3+f=eA@mail.gmail.com>

Hello Rob,

On 3/6/2025 3:44 AM, Rob Herring wrote:
> On Wed, Mar 5, 2025 at 3:43 PM Vankar, Chintan <c-vankar@ti.com> wrote:
>>
>> Hello Rob,
>>
>> On 3/5/2025 2:10 AM, Rob Herring wrote:
>>> On Tue, Mar 4, 2025 at 1:03 PM Vankar, Chintan <c-vankar@ti.com> wrote:
>>>>
>>>> Hello Rob,
>>>>
>>>> On 3/4/2025 9:09 PM, Rob Herring wrote:
>>>>> On Tue, Mar 04, 2025 at 03:53:05PM +0530, Chintan Vankar wrote:
>>>>>> DT-binding of reg-mux is defined in such a way that one need to provide
>>>>>> register offset and mask in a "mux-reg-masks" property and corresponding
>>>>>> register value in "idle-states" property. This constraint forces to define
>>>>>> these values in such a way that "mux-reg-masks" and "idle-states" must be
>>>>>> in sync with each other. This implementation would be more complex if
>>>>>> specific register or set of registers need to be configured which has
>>>>>> large memory space. Introduce a new property "mux-reg-masks-state" which
>>>>>> allow to specify offset, mask and value as a tuple in a single property.
>>>>>
>>>>> Maybe in hindsight that would have been better, but having 2 ways to
>>>>> specify the same thing that we have to maintain forever is not an
>>>>> improvement.
>>>>>
>>>>> No one is making you use this binding. If you have a large number of
>>>>> muxes, then maybe you should use a specific binding.
>>>>>
>>>>
>>>> Thank you for reviewing the patch. The reason behind choosing mux
>>>> subsystem is working and implementation of mmio driver. As we can see
>>>> that implementing this new property in mux-controller is almost
>>>> identical to mmio driver, and it would make it easier to define and
>>>> extend mux-controller's functionality. If we introduce the new driver
>>>> than that would be most likely a clone of mmio driver.
>>>
>>> I'm talking about the binding, not the driver. They are independent.
>>> Generic drivers are great. I love them. Generic bindings, not so much.
>>>
>>>> Let me know if implementation would be accepted by adding a new
>>>> compatible for it.
>>>
>>> Adding a new compatible to the mmio driver? Certainly. That happens
>>> all the time.
>>>
>>> I also didn't say don't use this binding as-is. That's fine too.
>>>
>>
>> Can you please review the following binding:
>>
>> oneOf:
>>     - required: [ mux-reg-masks ]
>>     - required: [ mux-reg-masks-state ]
>>
>> allOf:
>>     - if:
>>         required:
>>           - mux-reg-masks-state
>>       then:
>>         properties:
>>           idle-states: false
>>
>> required:
>>     - compatible
>>     - '#mux-control-cells'
>>
>> I think it won't disturb the current bindings and keep backward
>> compatibility with existing implementation.
> 
> Wasn't that the case before? There's nothing really different here.
> 

No, the binding before was not considering "mux-reg-masks" as required
property which was breaking actual dt-binding. In this binding, one of
the properties from "mux-reg-masks" or "mux-reg-masks-state" is required
which keeps the binding as it is unless someone wants to use
"mux-reg-masks-state".

Regards,
Chintan.

> Rob

  reply	other threads:[~2025-03-05 22:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 10:23 [RFC PATCH v2 0/2] Extend mmio-mux driver to configure mux with new DT property Chintan Vankar
2025-03-04 10:23 ` [RFC PATCH v2 1/2] devicetree: bindings: mux: reg-mux: Update bindings for reg-mux for new property Chintan Vankar
2025-03-04 10:47   ` Vankar, Chintan
2025-03-04 15:39   ` Rob Herring
2025-03-04 19:03     ` Vankar, Chintan
2025-03-04 20:40       ` Rob Herring
2025-03-05 21:43         ` Vankar, Chintan
2025-03-05 22:14           ` Rob Herring
2025-03-05 22:30             ` Vankar, Chintan [this message]
2025-04-22  8:42               ` Chintan Vankar
2025-03-04 10:23 ` [RFC PATCH v2 2/2] mux: mmio: Extend mmio-mux driver to configure mux with new DT property Chintan Vankar
2025-05-20  5:29 ` [RFC PATCH v2 0/2] " Chintan Vankar
2025-05-30 17:05   ` Vankar, Chintan
2025-05-31  5:52     ` Greg Kroah-Hartman
2025-05-31  9:37       ` Vankar, Chintan
2025-05-31 12:28         ` Greg Kroah-Hartman

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=b6fdfe6e-dbd3-4dc8-acf2-f2983f150df1@ti.com \
    --to=c-vankar@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=peda@axentia.se \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --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®