Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-19 Thread Russell King - ARM Linux
On Mon, Oct 19, 2015 at 11:25:49AM +0200, Marcin Wojtas wrote: > Thomas, > > 2015-10-19 9:23 GMT+02:00 Thomas Petazzoni > : > > Hello, > > > > On Mon, 19 Oct 2015 08:04:49 +0200, Marcin Wojtas wrote: > > > >> > I don't like this. The mvebu_pinctrl_soc_info structure is meant to be > >> > a read-on

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-19 Thread Marcin Wojtas
Hi Thomas, Found it - I think there is an easy way to get rid of all global variables in each pinctrl-. It's enough to: - extend struct mvebu_pinctrl with generic pointer - pass SoC specific structure to mvebu_pinctrl_probe via dev->driver_data - in mvebu_pinconf_group_set/get pass an additional a

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-19 Thread Marcin Wojtas
Thomas, 2015-10-19 9:23 GMT+02:00 Thomas Petazzoni : > Hello, > > On Mon, 19 Oct 2015 08:04:49 +0200, Marcin Wojtas wrote: > >> > I don't like this. The mvebu_pinctrl_soc_info structure is meant to be >> > a read-only structure that only describes static information giving >> > SoC-specific detail

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-19 Thread Thomas Petazzoni
Hello, On Mon, 19 Oct 2015 08:04:49 +0200, Marcin Wojtas wrote: > > I don't like this. The mvebu_pinctrl_soc_info structure is meant to be > > a read-only structure that only describes static information giving > > SoC-specific details for pin-muxing. The idea is that in the event > > where you h

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-18 Thread Marcin Wojtas
Hi Thomas, 2015-10-18 16:01 GMT+02:00 Thomas Petazzoni : > Hello Marcin, > > On Sun, 18 Oct 2015 10:43:42 +0200, Marcin Wojtas wrote: > >> Thanks for pointing this. I based on pinctrl-armada-xp.c (it needs a >> fix then, too) and it worked. I must have missed, because I got proper >> registers' nu

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-18 Thread Thomas Petazzoni
Hello Marcin, On Sun, 18 Oct 2015 10:43:42 +0200, Marcin Wojtas wrote: > Thanks for pointing this. I based on pinctrl-armada-xp.c (it needs a > fix then, too) and it worked. I must have missed, because I got proper > registers' number and values in suspend/resume routines. As > pinctrl-armada-xp.

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-18 Thread Marcin Wojtas
Hi Russell, Thanks for pointing this. I based on pinctrl-armada-xp.c (it needs a fix then, too) and it worked. I must have missed, because I got proper registers' number and values in suspend/resume routines. As pinctrl-armada-xp.c needs also a small fix and in order not to duplicate code, how abo

Re: [PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-17 Thread Russell King - ARM Linux
On Sat, Oct 17, 2015 at 11:28:48PM +0200, Marcin Wojtas wrote: > diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c > b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c > index 6ec82c6..094cb48 100644 > --- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c > +++ b/drivers/pinctrl/mvebu/pinctrl-armada-38

[PATCH] pinctrl: mvebu: armada-38x: add suspend/resume support

2015-10-17 Thread Marcin Wojtas
This commit adds suspend/resume support by saving and restoring registers' state in a dedicated array. Signed-off-by: Marcin Wojtas --- drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 37 ++ 1 file changed, 37 insertions(+) diff --git a/drivers/pinctrl/mvebu/pinctrl-arm