Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-08-14 Thread Linus Walleij
On Tue, Jul 30, 2013 at 12:01 AM, Stephen Warren wrote: > I was thinking more about people writing the device trees that define > these states; they need to explicitly make the choice re: overlapping > states or independent states. We should not plan to obsolete any current > usage of

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-08-14 Thread Linus Walleij
On Tue, Jul 30, 2013 at 12:01 AM, Stephen Warren swar...@wwwdotorg.org wrote: I was thinking more about people writing the device trees that define these states; they need to explicitly make the choice re: overlapping states or independent states. We should not plan to obsolete any current

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Stephen Warren
On 07/29/2013 03:21 AM, Tony Lindgren wrote: > * Stephen Warren [130719 12:05]: >> On 07/19/2013 01:39 AM, Tony Lindgren wrote: >>> >>> I think the only sane way to deal with this is to make the I2C controller >>> to show up as two separate I2C controller instances. Then use runtime >>> PM to

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Stephen Warren
On 07/29/2013 03:05 AM, Tony Lindgren wrote: > * Stephen Warren [130719 11:59]: >> On 07/19/2013 01:29 AM, Tony Lindgren wrote: >>> >>> I'd vote for keeping the existing behaviour with pinctrl_select_state() >>> when no active state is defined. >> >> Yes, I think that will work, since the active

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Linus Walleij [130722 16:14]: > On Tue, Jul 16, 2013 at 11:05 AM, Tony Lindgren wrote: > > > To toggle dynamic states, let's add the optional active state in > > addition to the static default state. Then if the optional active > > state is defined, we can require that idle and sleep states

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren [130719 12:05]: > On 07/19/2013 01:39 AM, Tony Lindgren wrote: > > > > I think the only sane way to deal with this is to make the I2C controller > > to show up as two separate I2C controller instances. Then use runtime > > PM to save and restore the state for each instance, and

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren [130719 12:10]: > On 07/19/2013 04:29 AM, Grygorii Strashko wrote: > > > > First of all, I'd like to mention that these patches do *not* connect > > pinctrl to PM runtime, so until driver will call pinctrl_select_state() > > or pinctrl_pm_select_*() there will be no pins state

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren [130719 11:59]: > On 07/19/2013 01:29 AM, Tony Lindgren wrote: > > > > I'd vote for keeping the existing behaviour with pinctrl_select_state() > > when no active state is defined. > > Yes, I think that will work, since the active state cannot exist before > this new scheme is

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130719 11:59]: On 07/19/2013 01:29 AM, Tony Lindgren wrote: I'd vote for keeping the existing behaviour with pinctrl_select_state() when no active state is defined. Yes, I think that will work, since the active state cannot exist before this new

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130719 12:10]: On 07/19/2013 04:29 AM, Grygorii Strashko wrote: First of all, I'd like to mention that these patches do *not* connect pinctrl to PM runtime, so until driver will call pinctrl_select_state() or pinctrl_pm_select_*() there will be no

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130719 12:05]: On 07/19/2013 01:39 AM, Tony Lindgren wrote: I think the only sane way to deal with this is to make the I2C controller to show up as two separate I2C controller instances. Then use runtime PM to save and restore the state for each

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Tony Lindgren
* Linus Walleij linus.wall...@linaro.org [130722 16:14]: On Tue, Jul 16, 2013 at 11:05 AM, Tony Lindgren t...@atomide.com wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Stephen Warren
On 07/29/2013 03:05 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130719 11:59]: On 07/19/2013 01:29 AM, Tony Lindgren wrote: I'd vote for keeping the existing behaviour with pinctrl_select_state() when no active state is defined. Yes, I think that will work, since the

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-29 Thread Stephen Warren
On 07/29/2013 03:21 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130719 12:05]: On 07/19/2013 01:39 AM, Tony Lindgren wrote: I think the only sane way to deal with this is to make the I2C controller to show up as two separate I2C controller instances. Then use runtime PM

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-22 Thread Linus Walleij
On Fri, Jul 19, 2013 at 9:03 PM, Stephen Warren wrote: > On 07/19/2013 04:29 AM, Grygorii Strashko wrote: >> First of all, I'd like to mention that these patches do *not* connect >> pinctrl to PM runtime, so until driver will call pinctrl_select_state() >> or pinctrl_pm_select_*() there will be

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-22 Thread Linus Walleij
On Tue, Jul 16, 2013 at 11:05 AM, Tony Lindgren wrote: > To toggle dynamic states, let's add the optional active state in > addition to the static default state. Then if the optional active > state is defined, we can require that idle and sleep states cover > the same pingroups as the active

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-22 Thread Linus Walleij
On Tue, Jul 16, 2013 at 11:05 AM, Tony Lindgren t...@atomide.com wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-22 Thread Linus Walleij
On Fri, Jul 19, 2013 at 9:03 PM, Stephen Warren swar...@wwwdotorg.org wrote: On 07/19/2013 04:29 AM, Grygorii Strashko wrote: First of all, I'd like to mention that these patches do *not* connect pinctrl to PM runtime, so until driver will call pinctrl_select_state() or pinctrl_pm_select_*()

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 01:29 AM, Tony Lindgren wrote: > * Stephen Warren [130718 12:27]: >> On 07/18/2013 01:25 AM, Tony Lindgren wrote: >>> * Stephen Warren [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: > To toggle dynamic states, let's add the optional active state in >

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 01:39 AM, Tony Lindgren wrote: > * Stephen Warren [130718 12:33]: >> On 07/18/2013 01:36 AM, Tony Lindgren wrote: >>> * Stephen Warren [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: >> ... Why shouldn't e.g. a pinctrl-based I2C mux also be able to do runtime

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 04:29 AM, Grygorii Strashko wrote: > Hi Tony, Stephen > > On 07/19/2013 10:39 AM, Tony Lindgren wrote: >> * Stephen Warren [130718 12:33]: >>> On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren [130717 14:30]: > On 07/16/2013 03:05 AM, Tony Lindgren wrote: >>>

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Grygorii Strashko
Hi Tony, Stephen On 07/19/2013 10:39 AM, Tony Lindgren wrote: * Stephen Warren [130718 12:33]: On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... Why shouldn't e.g. a pinctrl-based I2C mux also be able to do

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Tony Lindgren
* Stephen Warren [130718 12:33]: > On 07/18/2013 01:36 AM, Tony Lindgren wrote: > > * Stephen Warren [130717 14:30]: > >> On 07/16/2013 03:05 AM, Tony Lindgren wrote: > ... > >> Why shouldn't e.g. a pinctrl-based I2C mux also be able to do runtime > >> PM? Does the mux setting select which

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Tony Lindgren
* Stephen Warren [130718 12:27]: > On 07/18/2013 01:25 AM, Tony Lindgren wrote: > > * Stephen Warren [130717 14:21]: > >> On 07/16/2013 03:05 AM, Tony Lindgren wrote: > >>> To toggle dynamic states, let's add the optional active state in > >>> addition to the static default state. Then if the

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130718 12:27]: On 07/18/2013 01:25 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130718 12:33]: On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... Why shouldn't e.g. a pinctrl-based I2C mux also be able to do runtime PM? Does the

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Grygorii Strashko
Hi Tony, Stephen On 07/19/2013 10:39 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130718 12:33]: On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... Why shouldn't e.g. a

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 01:39 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130718 12:33]: On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... Why shouldn't e.g. a pinctrl-based I2C mux

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 01:29 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130718 12:27]: On 07/18/2013 01:25 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-19 Thread Stephen Warren
On 07/19/2013 04:29 AM, Grygorii Strashko wrote: Hi Tony, Stephen On 07/19/2013 10:39 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130718 12:33]: On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM,

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Stephen Warren
On 07/18/2013 01:36 AM, Tony Lindgren wrote: > * Stephen Warren [130717 14:30]: >> On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... >> Why shouldn't e.g. a pinctrl-based I2C mux also be able to do runtime >> PM? Does the mux setting select which states are used for runtime PM, or >> does runtime

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Stephen Warren
On 07/18/2013 01:25 AM, Tony Lindgren wrote: > * Stephen Warren [130717 14:21]: >> On 07/16/2013 03:05 AM, Tony Lindgren wrote: >>> To toggle dynamic states, let's add the optional active state in >>> addition to the static default state. Then if the optional active >>> state is defined, we can

[PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then let's add pinctrl_check_dynamic() and

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Tony Lindgren [130718 00:31]: > * Stephen Warren [130717 14:21]: > > On 07/16/2013 03:05 AM, Tony Lindgren wrote: > > > +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, > > > + struct pinctrl_state *st2) > > > +{ > > > + struct pinctrl_setting *s1,

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Stephen Warren [130717 14:30]: > On 07/16/2013 03:05 AM, Tony Lindgren wrote: > > To toggle dynamic states, let's add the optional active state in > > addition to the static default state. Then if the optional active > > state is defined, we can require that idle and sleep states cover > > the

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Stephen Warren [130717 14:21]: > On 07/16/2013 03:05 AM, Tony Lindgren wrote: > > To toggle dynamic states, let's add the optional active state in > > addition to the static default state. Then if the optional active > > state is defined, we can require that idle and sleep states cover > > the

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [130718 00:31]: * Stephen Warren swar...@wwwdotorg.org [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, + struct pinctrl_state *st2) +{ + struct

[PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Tony Lindgren
To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then let's add pinctrl_check_dynamic() and

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Stephen Warren
On 07/18/2013 01:25 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:21]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined,

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-18 Thread Stephen Warren
On 07/18/2013 01:36 AM, Tony Lindgren wrote: * Stephen Warren swar...@wwwdotorg.org [130717 14:30]: On 07/16/2013 03:05 AM, Tony Lindgren wrote: ... Why shouldn't e.g. a pinctrl-based I2C mux also be able to do runtime PM? Does the mux setting select which states are used for runtime PM, or

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-17 Thread Stephen Warren
On 07/16/2013 03:05 AM, Tony Lindgren wrote: > To toggle dynamic states, let's add the optional active state in > addition to the static default state. Then if the optional active > state is defined, we can require that idle and sleep states cover > the same pingroups as the active state. > >

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-17 Thread Stephen Warren
On 07/16/2013 03:05 AM, Tony Lindgren wrote: > To toggle dynamic states, let's add the optional active state in > addition to the static default state. Then if the optional active > state is defined, we can require that idle and sleep states cover > the same pingroups as the active state. > >

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-17 Thread Stephen Warren
On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-17 Thread Stephen Warren
On 07/16/2013 03:05 AM, Tony Lindgren wrote: To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Tony Lindgren
* Felipe Balbi [130716 02:42]: > Hi, > > On Tue, Jul 16, 2013 at 02:05:36AM -0700, Tony Lindgren wrote: > > +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, > > + struct pinctrl_state *st2) > > +{ > > + struct pinctrl_setting *s1, *s2; > > + > > +

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Felipe Balbi
Hi, On Tue, Jul 16, 2013 at 02:05:36AM -0700, Tony Lindgren wrote: > +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, > + struct pinctrl_state *st2) > +{ > + struct pinctrl_setting *s1, *s2; > + > + list_for_each_entry(s1, >settings, node) {

[PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Tony Lindgren
To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then let's add pinctrl_check_dynamic() and

[PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Tony Lindgren
To toggle dynamic states, let's add the optional active state in addition to the static default state. Then if the optional active state is defined, we can require that idle and sleep states cover the same pingroups as the active state. Then let's add pinctrl_check_dynamic() and

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Felipe Balbi
Hi, On Tue, Jul 16, 2013 at 02:05:36AM -0700, Tony Lindgren wrote: +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, + struct pinctrl_state *st2) +{ + struct pinctrl_setting *s1, *s2; + + list_for_each_entry(s1, st1-settings, node) { +

Re: [PATCH 3/4] pinctrl: Add support for additional dynamic states

2013-07-16 Thread Tony Lindgren
* Felipe Balbi ba...@ti.com [130716 02:42]: Hi, On Tue, Jul 16, 2013 at 02:05:36AM -0700, Tony Lindgren wrote: +int pinctrl_check_dynamic(struct device *dev, struct pinctrl_state *st1, + struct pinctrl_state *st2) +{ + struct pinctrl_setting *s1, *s2; + +