From: Peter Rosin <peda@axentia.se>
To: Aswath Govindraju <a-govindraju@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-can@vger.kernel.org, linux-phy@lists.infradead.org
Subject: Re: [PATCH RFC v3 3/4] mux: Add support for reading mux enable state from DT
Date: Mon, 29 Nov 2021 09:36:30 +0100 [thread overview]
Message-ID: <cadace04-0f7d-c1c0-0cc9-88ac16184a49@axentia.se> (raw)
In-Reply-To: <48156e28-4ef9-ce3a-bff6-c104a94bb869@ti.com>
On 2021-11-29 05:44, Aswath Govindraju wrote:
> Hi Peter,
>
> On 25/11/21 7:22 pm, Peter Rosin wrote:
>> Hi!
>>
>> On 2021-11-23 09:12, Aswath Govindraju wrote:
>>> In some cases, we might need to provide the state of the mux to be set for
>>> the operation of a given peripheral. Therefore, pass this information using
>>> the second argument of the mux-controls property.
>>>
>>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
>>> ---
>>> drivers/mux/core.c | 146 ++++++++++++++++++++++++++++++++++-
>>> include/linux/mux/consumer.h | 19 ++++-
>>> include/linux/mux/driver.h | 13 ++++
>>> 3 files changed, 173 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/mux/core.c b/drivers/mux/core.c
>>> index 22f4709768d1..9622b98f9818 100644
>>> --- a/drivers/mux/core.c
>>> +++ b/drivers/mux/core.c
>>> @@ -370,6 +370,29 @@ int mux_control_select_delay(struct mux_control *mux, unsigned int state,
>>> }
>>> EXPORT_SYMBOL_GPL(mux_control_select_delay);
>>>
>>> +/**
>>> + * mux_state_select_delay() - Select the enable state in mux-state
>>
>> The terminology is that you have a "mux" with different "states" that you
>> "select". What you are referring to as enabling a mux state, is elsewhere
>> referred to as selecting the mux state.
>>
>
> Sorry, for mentioning what I mean by enable state. So, the idea is the
> the state that would be mentioned in the DT property would be the state
> to which the mux to be set for enabling the given device and hence I am
> referring to it as enable state. I feel that referring to it as state
> would not convey the above.
Ah, but that this state it is use to "enable" your device is a mux
consumer detail in the context of the phy-can driver. Some other
driver might need a specific mux state for something completely
unrelated. So, the "enable" naming should not spread into the mux
code.
The situation is similar to when a driver needs an enable-gpio, the
gpio consumer knows that it's a gpio used to enable the device (or
whatever), but the gpio subsystem does not bother at all with what
the gpio is used for.
Cheers,
Peter
next prev parent reply other threads:[~2021-11-29 8:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 8:12 [PATCH RFC v3 0/4] MUX: Add support for reading enable state from DT Aswath Govindraju
2021-11-23 8:12 ` [PATCH RFC v3 1/4] dt-bindings: mux: Increase the number of arguments in mux-controls Aswath Govindraju
2021-11-25 13:35 ` Peter Rosin
2021-11-29 4:36 ` Aswath Govindraju
2021-11-29 8:15 ` Peter Rosin
2021-11-29 9:31 ` Aswath Govindraju
2021-11-29 12:28 ` Peter Rosin
2021-11-29 12:55 ` Aswath Govindraju
2021-11-23 8:12 ` [PATCH RFC v3 2/4] dt-bindings: phy: ti,tcan104x-can: Document mux-controls property Aswath Govindraju
2021-11-23 8:12 ` [PATCH RFC v3 3/4] mux: Add support for reading mux enable state from DT Aswath Govindraju
2021-11-25 13:52 ` Peter Rosin
2021-11-29 4:44 ` Aswath Govindraju
2021-11-29 8:36 ` Peter Rosin [this message]
2021-11-30 5:44 ` Aswath Govindraju
2021-11-30 5:58 ` Aswath Govindraju
2021-11-30 8:11 ` Peter Rosin
2021-11-23 8:12 ` [PATCH RFC v3 4/4] phy: phy-can-transceiver: Add support for setting mux Aswath Govindraju
2021-11-25 14:07 ` Peter Rosin
2021-11-29 4:51 ` 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=cadace04-0f7d-c1c0-0cc9-88ac16184a49@axentia.se \
--to=peda@axentia.se \
--cc=a-govindraju@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mkl@pengutronix.de \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
--cc=vkoul@kernel.org \
--cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).