Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-04-03 Thread Wolfram Sang
> While thinking about it (and I still think of it as a 'big issue' > compared to the intention of the initial patch) I came to the > conclusion that I should maybe just go for a board-specific > i2c-mux-pinctrl node instead of adding it to the SoC dtsi. That will > also avoid doubled i2c busses o

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-27 Thread Sebastian Hesselbarth
On 23.03.2015 19:32, Wolfram Sang wrote: If modifying i2c-mux-pinctrl to respect the sub-bus status property is such a big issue, I'd rather leave the driver as is and expose all sub-busses to userspace. Well, dunno what 'big issue' is in your book :) What definately needs to be done is: Wolf

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-23 Thread Wolfram Sang
> If modifying i2c-mux-pinctrl to respect the sub-bus status property is > such a big issue, I'd rather leave the driver as is and expose all > sub-busses to userspace. Well, dunno what 'big issue' is in your book :) What definately needs to be done is: * handle "status" at mux-core level, not m

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-22 Thread Sebastian Hesselbarth
On 21.03.2015 22:00, Wolfram Sang wrote: I guess what you want to have is that i2c_add_adapter() is not called for the disabled case, right? I think that makes sense. But maybe we should just start simple and keep calling i2c_add_adapter() for the disabled case. We will just skip probing devi

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-21 Thread Wolfram Sang
> > I guess what you want to have is that i2c_add_adapter() is not called > > for the disabled case, right? > > I think that makes sense. But maybe we should just start simple and keep calling i2c_add_adapter() for the disabled case. We will just skip probing devices on the bus. Would that help

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-20 Thread Wolfram Sang
> Ok, I see what you mean. I had a look at the place in question and > wonder what to return from i2c_add_mux_adapter() in the disabled > case so that i2c-mux-pinctrl is still happy with the returned value. Ouch, you are right. The crux of interfaces returning NULL instead of an ERR_PTR :( I'll h

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Sebastian Hesselbarth
On 19.03.2015 17:02, Wolfram Sang wrote: Perhaps better would be to have a mux-specific function to iterate over a mux's child nodes and instantiate buses for those. That function would check whether each bus node was disabled or not. That'd isolate the special case into the place where it was re

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Stephen Warren
On 03/19/2015 10:02 AM, Wolfram Sang wrote: - /* Only register child devices if the adapter has a node pointer set */ - if (!adap->dev.of_node) + /* Only register childs if adapter has a node pointer with enabled status */ + if (!adap->dev.of_node || !of_device_is_availab

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Wolfram Sang
> >-/* Only register child devices if the adapter has a node pointer set */ > >-if (!adap->dev.of_node) > >+/* Only register childs if adapter has a node pointer with enabled > >status */ > >+if (!adap->dev.of_node || !of_device_is_available(adap->dev.of_node)) > > retu

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Stephen Warren
On 03/19/2015 04:09 AM, Wolfram Sang wrote: Possible. But this change just makes i2c-mux-pinctrl honor status property at all. There is no functional change except it now allows you to disable any of the sub-busses. Actually, this is the feature I like. However, I wonder if we shouldn't have

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Wolfram Sang
> > I am still not too eager working on it but if you insist, I can see > > what I can do as long as Stephen sticks with testing it on Tegra. ;) > > Please decide if you want to work on it. Remember, I am not short of > patches to deal with. Maybe sounds more harsh than it was meant. I just want

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-19 Thread Wolfram Sang
> >>Possible. But this change just makes i2c-mux-pinctrl honor status > >>property at all. There is no functional change except it now allows > >>you to disable any of the sub-busses. > > > >Actually, this is the feature I like. However, I wonder if we shouldn't > >have that in the core, say in of

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-18 Thread Sebastian Hesselbarth
On 18.03.2015 15:00, Wolfram Sang wrote: On Wed, Mar 18, 2015 at 02:23:18PM +0100, Sebastian Hesselbarth wrote: Possible. But this change just makes i2c-mux-pinctrl honor status property at all. There is no functional change except it now allows you to disable any of the sub-busses. Actually,

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-18 Thread Wolfram Sang
On Wed, Mar 18, 2015 at 02:23:18PM +0100, Sebastian Hesselbarth wrote: > On 18.03.2015 13:30, Wolfram Sang wrote: > >On Mon, Mar 09, 2015 at 01:21:05PM +0100, Sebastian Hesselbarth wrote: > >>I2C mux pinctrl driver currently determines the number of sub-busses by > >>counting available pinctrl-name

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-18 Thread Sebastian Hesselbarth
On 18.03.2015 13:30, Wolfram Sang wrote: On Mon, Mar 09, 2015 at 01:21:05PM +0100, Sebastian Hesselbarth wrote: I2C mux pinctrl driver currently determines the number of sub-busses by counting available pinctrl-names. Unfortunately, this requires each incarnation of the devicetree node with diff

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-18 Thread Wolfram Sang
On Mon, Mar 09, 2015 at 01:21:05PM +0100, Sebastian Hesselbarth wrote: > I2C mux pinctrl driver currently determines the number of sub-busses by > counting available pinctrl-names. Unfortunately, this requires each > incarnation of the devicetree node with different available sub-busses > to be rew

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-16 Thread Sebastian Hesselbarth
On 10.03.2015 17:28, Stephen Warren wrote: On 03/09/2015 06:21 AM, Sebastian Hesselbarth wrote: I2C mux pinctrl driver currently determines the number of sub-busses by counting available pinctrl-names. Unfortunately, this requires each incarnation of the devicetree node with different available

Re: [PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-10 Thread Stephen Warren
On 03/09/2015 06:21 AM, Sebastian Hesselbarth wrote: I2C mux pinctrl driver currently determines the number of sub-busses by counting available pinctrl-names. Unfortunately, this requires each incarnation of the devicetree node with different available sub-busses to be rewritten. This patch rewo

[PATCH v3 1/4] i2c: mux-pinctrl: Rework to honor disabled child nodes

2015-03-09 Thread Sebastian Hesselbarth
I2C mux pinctrl driver currently determines the number of sub-busses by counting available pinctrl-names. Unfortunately, this requires each incarnation of the devicetree node with different available sub-busses to be rewritten. This patch reworks i2c-mux-pinctrl driver to count the number of avail