Re: Pulls and drive strengths in the pinctrl world

2013-05-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:42 Thu 23 May , Stephen Warren wrote: On 05/19/2013 03:17 AM, Jean-Christophe PLAGNIOL-VILLARD wrote: ... how a pin can not have mux? Well, if that's the way HW is designed, that's just the way it is. There are certainly pins on Tegra which don't have a mux in HW, but have

Re: Pulls and drive strengths in the pinctrl world

2013-05-23 Thread Stephen Warren
On 05/18/2013 10:30 AM, Jean-Christophe PLAGNIOL-VILLARD wrote: On 16:57 Sat 18 May , Tomasz Figa wrote: ... Personally I'd prefer a solution with separate property for each parameter, because it's much more flexible and allows shorter lines, making device tree sources more readable.

Re: Pulls and drive strengths in the pinctrl world

2013-05-23 Thread Stephen Warren
On 05/19/2013 03:17 AM, Jean-Christophe PLAGNIOL-VILLARD wrote: ... how a pin can not have mux? Well, if that's the way HW is designed, that's just the way it is. There are certainly pins on Tegra which don't have a mux in HW, but have some configuration options such as drive strength that can

Re: Pulls and drive strengths in the pinctrl world

2013-05-21 Thread Tomasz Figa
On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus, On Wed, May 15, 2013 at 3:06 PM, Tomasz

Re: Pulls and drive strengths in the pinctrl world

2013-05-21 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:28 Tue 21 May , Tomasz Figa wrote: On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus,

Re: Pulls and drive strengths in the pinctrl world

2013-05-19 Thread Jean-Christophe PLAGNIOL-VILLARD
PULL_UP (1 0): indicate this pin need a pull up. MULTIDRIVE (1 1): indicate this pin need to be configured as multidrive. DEGLITCH(1 2): indicate this pin need deglitch. PULL_DOWN (1 3): indicate this pin need a pull down. DIS_SCHMIT (1

Re: Pulls and drive strengths in the pinctrl world

2013-05-19 Thread Tomasz Figa
On Sunday 19 of May 2013 11:17:36 Jean-Christophe PLAGNIOL-VILLARD wrote: PULL_UP (1 0): indicate this pin need a pull up. MULTIDRIVE (1 1): indicate this pin need to be configured as multidrive. DEGLITCH(1 2): indicate this pin need deglitch.

Re: Pulls and drive strengths in the pinctrl world

2013-05-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:46 Sun 19 May , Tomasz Figa wrote: On Sunday 19 of May 2013 11:17:36 Jean-Christophe PLAGNIOL-VILLARD wrote: PULL_UP (1 0): indicate this pin need a pull up. MULTIDRIVE (1 1): indicate this pin need to be configured as multidrive. DEGLITCH

Re: Pulls and drive strengths in the pinctrl world

2013-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:17 Fri 17 May , Tomasz Figa wrote: Hi Jean-Christophe, On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson

Re: Pulls and drive strengths in the pinctrl world

2013-05-18 Thread Tomasz Figa
On Saturday 18 of May 2013 10:18:47 Jean-Christophe PLAGNIOL-VILLARD wrote: On 14:17 Fri 17 May , Tomasz Figa wrote: Hi Jean-Christophe, On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013

Re: Pulls and drive strengths in the pinctrl world

2013-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:57 Sat 18 May , Tomasz Figa wrote: On Saturday 18 of May 2013 10:18:47 Jean-Christophe PLAGNIOL-VILLARD wrote: On 14:17 Fri 17 May , Tomasz Figa wrote: Hi Jean-Christophe, On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15

Re: Pulls and drive strengths in the pinctrl world

2013-05-18 Thread Tomasz Figa
On Saturday 18 of May 2013 18:30:01 Jean-Christophe PLAGNIOL-VILLARD wrote: On 16:57 Sat 18 May , Tomasz Figa wrote: On Saturday 18 of May 2013 10:18:47 Jean-Christophe PLAGNIOL-VILLARD wrote: On 14:17 Fri 17 May , Tomasz Figa wrote: Hi Jean-Christophe, On Friday

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Linus Walleij
On Thu, May 16, 2013 at 2:03 AM, Doug Anderson diand...@google.com wrote: I prefer to put all the static pinctrl configuration in the pinctrl hog, and only the dynamic stuff in the individual device nodes. I know LinusW won't like this suggestion much though:-) (It's not that bad

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Tomasz Figa
Hi Linus, On Friday 17 of May 2013 10:38:53 Linus Walleij wrote: On Thu, May 16, 2013 at 2:03 AM, Doug Anderson diand...@google.com wrote: I prefer to put all the static pinctrl configuration in the pinctrl hog, and only the dynamic stuff in the individual device nodes. I know LinusW

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Linus Walleij
On Fri, May 17, 2013 at 11:09 AM, Tomasz Figa tomasz.f...@gmail.com wrote: Just add another state, pctldev-hog_shutdown to this, and add an operation pinctrl_force_poweroff() in the same spirit as pinctrl_force_sleep() that we already have. Add a new state to

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Tomasz Figa
Hi Linus, On Friday 17 of May 2013 13:59:54 Linus Walleij wrote: On Fri, May 17, 2013 at 11:09 AM, Tomasz Figa tomasz.f...@gmail.com wrote: Just add another state, pctldev-hog_shutdown to this, and add an operation pinctrl_force_poweroff() in the same spirit as pinctrl_force_sleep() that

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus, On Wed, May 15, 2013 at 3:06 PM, Tomasz Figa tomasz.f...@gmail.com wrote: Yes. I don't like the current way too much

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Doug Anderson
Tomasz, On Fri, May 17, 2013 at 5:38 AM, Tomasz Figa t.f...@samsung.com wrote: You might want to have a debugfs file in your driver for inspecting them though, that sounds like it could be helpful. I'd recommend augmenting your .pin_config_dbg_show() callback in the struct pinconf_ops to

Re: Pulls and drive strengths in the pinctrl world

2013-05-17 Thread Tomasz Figa
Hi Jean-Christophe, On Friday 17 of May 2013 14:26:25 Jean-Christophe PLAGNIOL-VILLARD wrote: On 18:22 Wed 15 May , Stephen Warren wrote: On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus, On Wed, May 15, 2013

Re: Pulls and drive strengths in the pinctrl world

2013-05-16 Thread Doug Anderson
Tomasz / Stephen, On Wed, May 15, 2013 at 5:55 PM, Doug Anderson diand...@google.com wrote: Also after reading Stephen's reply, I'm wondering if hogging wouldn't solve the problem indeed. (It might have to be fixed on pinctrl-samsung first, as last time I tried to use it, it caused some errors

Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Linus, I'm currently working towards adapting exynos5250-snow (the ARM Chromebook) to work well in the new world of pinctrl. We've got a backport of exynos5250 pinctrl in our kernel-3.8 tree and are now fixing all of the bugs that have popped up. Patches will be sent upstream (where applicable)

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
Hi Doug, There is no better way at the moment, but... On Wednesday 15 of May 2013 09:44:22 Doug Anderson wrote: Linus, I'm currently working towards adapting exynos5250-snow (the ARM Chromebook) to work well in the new world of pinctrl. We've got a backport of exynos5250 pinctrl in our

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Olof Johansson
On Wed, May 15, 2013 at 10:26 AM, Tomasz Figa tomasz.f...@gmail.com wrote: I don't want to specify function/direction (code can handle that), but do wish I could specify the pulls and strength. Perhaps: ptn3460-bridge@20 { compatible = nxp,ptn3460; reg = 0x20; powerdown-gpio

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Linus Walleij
On Wed, May 15, 2013 at 6:44 PM, Doug Anderson diand...@google.com wrote: Pls include Stephen Warren on mailings regarding DT mappings, he's very good at this stuff. I'm running into an issue when trying to specify pullups / pulldowns and drive strengths on lines that are just GPIOs or just

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz, Thanks for your comments. I'm glad I'm not totally off-track. I'll respond to most things in reply to Linus' email, but a few here: On Wed, May 15, 2013 at 10:26 AM, Tomasz Figa tomasz.f...@gmail.com wrote: pinctrl@1140 { cyapa_irq: cyapa-irq { samsung,pins = gpx1-2;

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Linus, Thank you for your comments. See below... Stephen: sorry for missing you earlier! :( On Wed, May 15, 2013 at 11:29 AM, Linus Walleij linus.wall...@linaro.org wrote: But please use the preprocessor to provide symbolic names for the configurations. See for example these two patches

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 14:19:18 Doug Anderson wrote: Tomasz, Thanks for your comments. I'm glad I'm not totally off-track. I'll respond to most things in reply to Linus' email, but a few here: On Wed, May 15, 2013 at 10:26 AM, Tomasz Figa tomasz.f...@gmail.com wrote:

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 14:31:20 Doug Anderson wrote: Linus, Thank you for your comments. See below... Stephen: sorry for missing you earlier! :( On Wed, May 15, 2013 at 11:29 AM, Linus Walleij linus.wall...@linaro.org wrote: But please use the preprocessor to provide symbolic

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 23:41:54 Tomasz Figa wrote: On Wednesday 15 of May 2013 14:31:20 Doug Anderson wrote: Linus, Thank you for your comments. See below... Stephen: sorry for missing you earlier! :( On Wed, May 15, 2013 at 11:29 AM, Linus Walleij

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz, On Wed, May 15, 2013 at 2:36 PM, Tomasz Figa tomasz.f...@gmail.com wrote: One potential reason for leaving them is the hopes that it might cause a little less line glitching, especially in the case of outputs. There is some delay between the pinmux being configured at the start of

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz, On Wed, May 15, 2013 at 2:41 PM, Tomasz Figa tomasz.f...@gmail.com wrote: This will be hard, since the phandle in interrupt-parent is represented by an IRQ domain in kernel code. One-interrupt IRQ domains seem a bit awkward to me. Since we are already going to modify the binding,

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 15:01:23 Doug Anderson wrote: Tomasz, On Wed, May 15, 2013 at 2:41 PM, Tomasz Figa tomasz.f...@gmail.com wrote: This will be hard, since the phandle in interrupt-parent is represented by an IRQ domain in kernel code. One-interrupt IRQ domains seem a bit

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Stephen Warren
On 05/15/2013 12:29 PM, Linus Walleij wrote: On Wed, May 15, 2013 at 6:44 PM, Doug Anderson diand...@google.com wrote: ... Here's how I need to do things when I'm using just an interrupt: pinctrl@1140 { cyapa_irq: cyapa-irq { samsung,pins = gpx1-2; samsung,pin-function

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz / Linus, On Wed, May 15, 2013 at 3:06 PM, Tomasz Figa tomasz.f...@gmail.com wrote: Yes. I don't like the current way too much either, duplication being one of the reasons. Do you have any other ideas? It sounds like Linus didn't like my suggestion and makes some good points... I don't

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Stephen, On Wed, May 15, 2013 at 4:51 PM, Stephen Warren swar...@wwwdotorg.org wrote: I don't really see much disadvantage here; the interrupt bindings specify things related to interrupts and the pinctrl bindings specify thing related to pin configuration. OK. If this is the best way then I

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus, On Wed, May 15, 2013 at 3:06 PM, Tomasz Figa tomasz.f...@gmail.com wrote: Yes. I don't like the current way too much either, duplication being one of the reasons. Do you have any other ideas? It sounds like

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Tomasz Figa
On Wednesday 15 of May 2013 17:03:44 Doug Anderson wrote: Stephen, On Wed, May 15, 2013 at 4:51 PM, Stephen Warren swar...@wwwdotorg.org wrote: I don't really see much disadvantage here; the interrupt bindings specify things related to interrupts and the pinctrl bindings specify thing

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Stephen Warren
On 05/15/2013 06:13 PM, Tomasz Figa wrote: On Wednesday 15 of May 2013 16:55:37 Doug Anderson wrote: Tomasz / Linus, On Wed, May 15, 2013 at 3:06 PM, Tomasz Figa tomasz.f...@gmail.com wrote: Yes. I don't like the current way too much either, duplication being one of the reasons. Do you

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz, On Wed, May 15, 2013 at 5:13 PM, Tomasz Figa tomasz.f...@gmail.com wrote: I don't have anything interesting at the moment. It's a bit late now here (2 AM), so I'm going to get some sleep first. Sorry for keeping you up. Sleep is good! Also after reading Stephen's reply, I'm

Re: Pulls and drive strengths in the pinctrl world

2013-05-15 Thread Doug Anderson
Tomasz, On Wed, May 15, 2013 at 5:19 PM, Tomasz Figa tomasz.f...@gmail.com wrote: Hmm, last thing before I fell asleep: We already have support for power down configuration in pinctrl-samsung. See samsung,pin-conpdn and samsung,pin-pudpdn. Dang it! OK, we'll work on using those. Also I