Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702387 > unrolled thread

Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member

Started byStephen Warren <swarren@wwwdotorg.org>
First post2017-08-02 21:20 +0200
Last post2017-08-03 23:50 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member Stephen Warren <swarren@wwwdotorg.org> - 2017-08-02 21:20 +0200
    Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member Stephen Warren <swarren@wwwdotorg.org> - 2017-08-03 01:00 +0200
      Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member Stephen Warren <swarren@wwwdotorg.org> - 2017-08-03 23:50 +0200

#1702387 — Re: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member

FromStephen Warren <swarren@wwwdotorg.org>
Date2017-08-02 21:20 +0200
SubjectRe: [PATCH 2/2] i2c: mux: pinctrl: drop the idle_state member
Message-ID<ua7lv-5EM-11@gated-at.bofh.it>
On 08/02/2017 01:27 AM, Peter Rosin wrote:
> The information is available elsewhere.

> diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c

>   static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan)
>   {
> +	return i2c_mux_pinctrl_select(muxc, muxc->num_adapters);
>   }

> @@ -166,7 +162,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)

>   	/* Do not add any adapter for the idle state (if it's there at all). */
> -	for (i = 0; i < num_names - !!mux->state_idle; i++) {
> +	for (i = 0; i < num_names - !!muxc->deselect; i++) {

I think that "num_names - !!muxc->deselect" could just be 
muxc->num_adapters? Otherwise,

Reviewed-by: Stephen Warren <swarren@nvidia.com>

[toc] | [next] | [standalone]


#1702545

FromStephen Warren <swarren@wwwdotorg.org>
Date2017-08-03 01:00 +0200
Message-ID<uaaMq-7QI-19@gated-at.bofh.it>
In reply to#1702387
On 08/02/2017 03:25 PM, Peter Rosin wrote:
> On 2017-08-02 21:06, Stephen Warren wrote:
>> On 08/02/2017 01:27 AM, Peter Rosin wrote:
>>> The information is available elsewhere.
>>
>>> diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
>>
>>>    static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan)
>>>    {
>>> +	return i2c_mux_pinctrl_select(muxc, muxc->num_adapters);
>>>    }
>>
>>> @@ -166,7 +162,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
>>
>>>    	/* Do not add any adapter for the idle state (if it's there at all). */
>>> -	for (i = 0; i < num_names - !!mux->state_idle; i++) {
>>> +	for (i = 0; i < num_names - !!muxc->deselect; i++) {
>>
>> I think that "num_names - !!muxc->deselect" could just be
>> muxc->num_adapters?
> 
> Not really, it's the i2c_mux_add_adapter call in the loop that bumps
> muxc->num_adapters, so the loop would not be entered. Not desirable :-)

Ok, that makes sense.

> (and muxc->max_adapters == num_names)

Well, unless muxc->deselect is true...

[toc] | [prev] | [next] | [standalone]


#1703452

FromStephen Warren <swarren@wwwdotorg.org>
Date2017-08-03 23:50 +0200
Message-ID<uawae-5UG-33@gated-at.bofh.it>
In reply to#1702545
On 08/02/2017 11:19 PM, Peter Rosin wrote:
> On 2017-08-03 00:50, Stephen Warren wrote:
>> On 08/02/2017 03:25 PM, Peter Rosin wrote:
>>> (and muxc->max_adapters == num_names)
>>
>> Well, unless muxc->deselect is true...
> 
> No, deselect does not affect neither max_adapters nor num_names. They
> are always equal.

Ah yes, I was confusing max_adapters with num_adapters.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web