linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: Biwen Li <biwen.li@nxp.com>, Rob Herring <robh@kernel.org>
Cc: Leo Li <leoyang.li@nxp.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [EXT] Re: [v2,2/2] dt-bindings: i2c-mux-pca954x: Add optional property i2c-mux-never-disable
Date: Mon, 14 Oct 2019 07:06:26 +0000	[thread overview]
Message-ID: <1f0c4d52-03d5-2947-f701-a0b5ab46c8e0@axentia.se> (raw)
In-Reply-To: <DB7PR04MB4490094F26EA412D4D9F5CF98F900@DB7PR04MB4490.eurprd04.prod.outlook.com>

On 2019-10-14 06:16, Biwen Li wrote:
>>
>>>
>>> On Mon, Sep 30, 2019 at 11:25:03AM +0800, Biwen Li wrote:
>>>> The patch adds an optional property i2c-mux-never-disable
>>>>
>>>> Signed-off-by: Biwen Li <biwen.li@nxp.com>
>>>> ---
>>>> Change in v2:
>>>>       - update documentation
>>>>
>>>>  Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git
>>>> a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt
>>>> b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt
>>>> index 30ac6a60f041..71b73d0fdb62 100644
>>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt
>>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt
>>>> @@ -34,6 +34,7 @@ Optional Properties:
>>>>      - first cell is the pin number
>>>>      - second cell is used to specify flags.
>>>>      See also
>>>> Documentation/devicetree/bindings/interrupt-controller/interrupts.tx
>>>> t
>>>> +  - i2c-mux-never-disable: always forces mux to be enabled.
>>>
>>> Either needs to have a vendor prefix or be documented as a common
>>> property.
> I choose to be documented as a common property.

Can we please just drop the never-disable approach and focus on idle-state
instead?

>>>
>>> IIRC, we already have a property for mux default state which seems
>>> like that would cover this unless you need to leave it in different states.
>> Okay, you are right, thank you so much. I will try it in v3.
> Do you mean that the property is i2c-mux-idle-disconnect in Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt?
> If so, the property i2c-mux-idle-disconnect is not good for me.
> Because condition of the property i2c-mux-idle-disconnect is in idle state(sometimes).
> But I need always enable i2c multiplexer in whatever state(anytime), so I add a common property i2c-mux-never-disable.

No, I do not think any new property is needed. AFAICT, idle-state fits
perfectly, and I will not consider this i2c-mux-never-disable
approach until some compelling reason is presented why idle-state
is not appropriate. You promised to take a stab at it, and until
I hear back on that, this series is on hold. As indicated here [1].

You need to patch the driver to look at the idle-state property
instead of inventing a new (and less flexible) property. If you
implement idle-state for this driver and set the idle-state to
some channel in the dts, the mux will never disconnect. Problem solved.
Perhaps not your first solution, but it does solve your problem and
may actually be useful for other purposes than your broken hardware.
And it is consistent across other i2c-muxes. I see no downside.

Cheers,
Peter

[1] https://lore.kernel.org/lkml/07d85748-0721-39d4-d2be-13eb16b0f1de@axentia.se/

  reply	other threads:[~2019-10-14  7:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30  3:25 [v2,1/2] i2c: pca954x: Add property to skip disabling PCA954x MUX device Biwen Li
2019-09-30  3:25 ` [v2,2/2] dt-bindings: i2c-mux-pca954x: Add optional property i2c-mux-never-disable Biwen Li
2019-10-11 14:44   ` Rob Herring
2019-10-14  3:21     ` [EXT] " Biwen Li
2019-10-14  4:16       ` Biwen Li
2019-10-14  7:06         ` Peter Rosin [this message]
2019-10-14  7:26           ` Biwen Li

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=1f0c4d52-03d5-2947-f701-a0b5ab46c8e0@axentia.se \
    --to=peda@axentia.se \
    --cc=biwen.li@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh@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).