Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-16 Thread Linus Walleij
On Tue, Jun 11, 2013 at 9:27 AM, Christian Ruppert wrote: > On Fri, Jun 07, 2013 at 01:18:35PM -0600, Stephen Warren wrote: >> However, then the correlation between these pretend pins (i.e. really >> the groups) and GPIOs won't work, because each "pin" is really 4 pins, >> and hence 4 GPIOs, and

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-11 Thread Christian Ruppert
On Fri, Jun 07, 2013 at 01:18:35PM -0600, Stephen Warren wrote: > On 06/06/2013 09:30 AM, Christian Ruppert wrote: > > On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: > >> On 6 June 2013 22:11, Christian Ruppert > >> wrote: > >>> On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Z

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-08 Thread Stephen Warren
On 06/08/2013 02:31 AM, Haojian Zhuang wrote: > On 8 June 2013 03:18, Stephen Warren wrote: >> On 06/06/2013 09:30 AM, Christian Ruppert wrote: >>> On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: On 6 June 2013 22:11, Christian Ruppert wrote: > On Wed, Jun 05, 2013

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-08 Thread Haojian Zhuang
On 8 June 2013 03:18, Stephen Warren wrote: > On 06/06/2013 09:30 AM, Christian Ruppert wrote: >> On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: >>> On 6 June 2013 22:11, Christian Ruppert >>> wrote: On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: > On 3

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-07 Thread Stephen Warren
On 06/06/2013 09:30 AM, Christian Ruppert wrote: > On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: >> On 6 June 2013 22:11, Christian Ruppert wrote: >>> On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: On 3 June 2013 20:30, Christian Ruppert wrote: >

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-07 Thread Haojian Zhuang
On 7 June 2013 19:32, Christian Ruppert wrote: > On Fri, Jun 07, 2013 at 08:00:57AM +0800, Haojian Zhuang wrote: >> On 6 June 2013 23:30, Christian Ruppert wrote: >> > On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: >> >> On 6 June 2013 22:11, Christian Ruppert >> >> wrote: >> >

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-07 Thread Christian Ruppert
On Fri, Jun 07, 2013 at 01:36:16PM +0200, Linus Walleij wrote: > On Mon, Jun 3, 2013 at 11:42 AM, Christian Ruppert > wrote: > > > Ease of use is also the reason why I added the gpio-base property to the > > original driver: Finding out the global GPIO number to use in > > /sys/class/gpio for a g

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-07 Thread Linus Walleij
On Mon, Jun 3, 2013 at 11:42 AM, Christian Ruppert wrote: > Ease of use is also the reason why I added the gpio-base property to the > original driver: Finding out the global GPIO number to use in > /sys/class/gpio for a given GPIO of a given bank seems to be a recurring > headache for our custom

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-07 Thread Christian Ruppert
On Fri, Jun 07, 2013 at 08:00:57AM +0800, Haojian Zhuang wrote: > On 6 June 2013 23:30, Christian Ruppert wrote: > > On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: > >> On 6 June 2013 22:11, Christian Ruppert > >> wrote: > >> > On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Z

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-06 Thread Haojian Zhuang
On 6 June 2013 23:30, Christian Ruppert wrote: > On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: >> On 6 June 2013 22:11, Christian Ruppert wrote: >> > On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: >> >> On 3 June 2013 20:30, Christian Ruppert >> >> wrote: >> >

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-06 Thread Christian Ruppert
On Thu, Jun 06, 2013 at 10:32:21PM +0800, Haojian Zhuang wrote: > On 6 June 2013 22:11, Christian Ruppert wrote: > > On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: > >> On 3 June 2013 20:30, Christian Ruppert > >> wrote: > >> > OK, here's a simplified example of what we would li

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-06 Thread Haojian Zhuang
On 6 June 2013 22:11, Christian Ruppert wrote: > On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: >> On 3 June 2013 20:30, Christian Ruppert wrote: >> > OK, here's a simplified example of what we would like to do (this seems >> > pretty common so I suppose there is a way I haven't

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-06 Thread Christian Ruppert
On Wed, Jun 05, 2013 at 09:44:27AM +0800, Haojian Zhuang wrote: > On 3 June 2013 20:30, Christian Ruppert wrote: > > OK, here's a simplified example of what we would like to do (this seems > > pretty common so I suppose there is a way I haven't understood). Our > > situation is slightly more compl

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-04 Thread Haojian Zhuang
On 3 June 2013 20:30, Christian Ruppert wrote: > OK, here's a simplified example of what we would like to do (this seems > pretty common so I suppose there is a way I haven't understood). Our > situation is slightly more complex but for the purpose of discussion > let's assume a chip with 8 pins w

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-03 Thread Christian Ruppert
On Sun, May 26, 2013 at 11:49:20PM +0800, Haojian Zhuang wrote: > On 24 May 2013 19:50, Christian Ruppert wrote: > > Hello Haojian, > > > > On Thu, May 23, 2013 at 03:43:27PM +0800, Haojian Zhuang wrote: > >> On 22 May 2013 22:28, Christian Ruppert > >> wrote: > >> > > >> > On Mon, May 20, 2013

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-06-03 Thread Christian Ruppert
On Wed, May 29, 2013 at 02:21:05PM +0200, Linus Walleij wrote: > On Fri, May 24, 2013 at 1:50 PM, Christian Ruppert > wrote: > > > I haven't understood how to associate GPIOs to > > other functions, however: Our hardware pin controller makes GPIO pins > > available depending on the configuration

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-29 Thread Linus Walleij
On Fri, May 24, 2013 at 1:50 PM, Christian Ruppert wrote: > I haven't understood how to associate GPIOs to > other functions, however: Our hardware pin controller makes GPIO pins > available depending on the configuration of the non-GPIO interfaces. > This means that in many configurations, GPIO

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-26 Thread Haojian Zhuang
On 24 May 2013 19:50, Christian Ruppert wrote: > Hello Haojian, > > On Thu, May 23, 2013 at 03:43:27PM +0800, Haojian Zhuang wrote: >> On 22 May 2013 22:28, Christian Ruppert wrote: >> > >> > On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: >> > > On Thu, May 16, 2013 at 2:12 AM, St

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-24 Thread Christian Ruppert
On Fri, May 24, 2013 at 11:20:31AM +0200, Linus Walleij wrote: > On Wed, May 22, 2013 at 4:28 PM, Christian Ruppert > wrote: > > On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: > > >> It's not even pinctrl-simple-centric it is completely generic. > >> The code is in drivers/gpio/gp

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-24 Thread Christian Ruppert
Hello Haojian, On Thu, May 23, 2013 at 03:43:27PM +0800, Haojian Zhuang wrote: > On 22 May 2013 22:28, Christian Ruppert wrote: > > > > On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: > > > On Thu, May 16, 2013 at 2:12 AM, Stephen Warren > > > wrote: > > > > On 05/10/2013 02:25 A

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-24 Thread Linus Walleij
On Wed, May 22, 2013 at 4:28 PM, Christian Ruppert wrote: > On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: >> It's not even pinctrl-simple-centric it is completely generic. >> The code is in drivers/gpio/gpiolib-of.c. >> >> It was written by Shiraz Hashin and Haojian Zhuang. >> At

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-23 Thread Haojian Zhuang
On 22 May 2013 22:28, Christian Ruppert wrote: > > On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: > > On Thu, May 16, 2013 at 2:12 AM, Stephen Warren > > wrote: > > > On 05/10/2013 02:25 AM, Christian Ruppert wrote: > > > > >> (*1) TB100 GPIO ranges are defined as a phandle to th

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-22 Thread Christian Ruppert
On Mon, May 20, 2013 at 10:10:33AM +0200, Linus Walleij wrote: > On Thu, May 16, 2013 at 2:12 AM, Stephen Warren wrote: > > On 05/10/2013 02:25 AM, Christian Ruppert wrote: > > >> (*1) TB100 GPIO ranges are defined as a phandle to the I/O function > >> which provides all pins of a given GPIO

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-22 Thread Christian Ruppert
On Mon, May 20, 2013 at 10:03:24AM +0200, Linus Walleij wrote: > On Wed, May 15, 2013 at 11:41 AM, Christian Ruppert > wrote: > > On Tue, May 14, 2013 at 02:29:46PM +0200, Linus Walleij wrote: > > >> Look at for example > >> drivers/pinctrl/pinctrl-abx500.c: > >> > >> static u8 abx500_get_mode(st

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-20 Thread Linus Walleij
On Thu, May 16, 2013 at 2:12 AM, Stephen Warren wrote: > On 05/10/2013 02:25 AM, Christian Ruppert wrote: >> (*1) TB100 GPIO ranges are defined as a phandle to the I/O function >> which provides all pins of a given GPIO port. This function is not >> necessarily requested from pinctrl an

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-20 Thread Linus Walleij
On Wed, May 15, 2013 at 11:41 AM, Christian Ruppert wrote: > On Tue, May 14, 2013 at 02:29:46PM +0200, Linus Walleij wrote: >> Look at for example >> drivers/pinctrl/pinctrl-abx500.c: >> >> static u8 abx500_get_mode(struct pinctrl_dev *pctldev, struct gpio_chip >> *chip, >>

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-15 Thread Stephen Warren
On 05/10/2013 02:25 AM, Christian Ruppert wrote: > On Wed, May 08, 2013 at 02:01:53PM -0600, Stephen Warren wrote: >> On 05/08/2013 10:41 AM, Christian Ruppert wrote: >> ... >>> What do you think about the following modification to the pinctrl/GPIO >>> frameworks instead (not yet a formal patch, mo

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-15 Thread Christian Ruppert
On Tue, May 14, 2013 at 02:29:46PM +0200, Linus Walleij wrote: > On Fri, May 10, 2013 at 10:25 AM, Christian Ruppert > wrote: > > >> > What do you think about the following modification to the pinctrl/GPIO > >> > frameworks instead (not yet a formal patch, more a request for comment > >> > to ill

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-14 Thread Linus Walleij
On Fri, May 10, 2013 at 10:25 AM, Christian Ruppert wrote: >> > What do you think about the following modification to the pinctrl/GPIO >> > frameworks instead (not yet a formal patch, more a request for comment >> > to illustrate what I mean. If you agree, I will clean it up and submit a >> > pro

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-10 Thread Christian Ruppert
On Wed, May 08, 2013 at 02:01:53PM -0600, Stephen Warren wrote: > On 05/08/2013 10:41 AM, Christian Ruppert wrote: > ... > > What do you think about the following modification to the pinctrl/GPIO > > frameworks instead (not yet a formal patch, more a request for comment > > to illustrate what I mea

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-08 Thread Stephen Warren
On 05/08/2013 10:41 AM, Christian Ruppert wrote: ... > What do you think about the following modification to the pinctrl/GPIO > frameworks instead (not yet a formal patch, more a request for comment > to illustrate what I mean. If you agree, I will clean it up and submit a > proper patch after disc

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-08 Thread Christian Ruppert
On Fri, May 03, 2013 at 08:03:27PM +0200, Linus Walleij wrote: > On Thu, May 2, 2013 at 8:49 PM, Stephen Warren wrote: > > On 04/29/2013 10:17 AM, Christian Ruppert wrote: > >>> > >>> So if this is what you want to achieve, just use the same number > >>> as in your datasheet in the pin number -> p

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-03 Thread Linus Walleij
On Thu, May 2, 2013 at 8:49 PM, Stephen Warren wrote: > On 04/29/2013 10:17 AM, Christian Ruppert wrote: >>> >>> So if this is what you want to achieve, just use the same number >>> as in your datasheet in the pin number -> problem solved. >> >> The problem is that we must support several products

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-02 Thread Stephen Warren
On 04/18/2013 03:03 AM, Christian Ruppert wrote: > Dear Stephen and Linus, > > I am responding to this message because it touches the core issue I was > wondering about when integrating pinctrl with GPIO. I think all > unrelated comments in your other messages are valid and will be > addressed in

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-05-02 Thread Stephen Warren
On 04/29/2013 10:17 AM, Christian Ruppert wrote: > Hello Linus, > > On Fri, Apr 26, 2013 at 09:47:16AM +0200, Linus Walleij wrote: >> On Thu, Apr 18, 2013 at 11:03 AM, Christian Ruppert >> wrote: >> >>> We would like to avoid the use of Linux pin numbers in the device tree. >>> Customers are used

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-04-29 Thread Christian Ruppert
Hello Linus, On Fri, Apr 26, 2013 at 09:47:16AM +0200, Linus Walleij wrote: > On Thu, Apr 18, 2013 at 11:03 AM, Christian Ruppert > wrote: > > > We would like to avoid the use of Linux pin numbers in the device tree. > > Customers are used to physical pin numbers and exposing the logical > > Lin

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-04-26 Thread Linus Walleij
On Thu, Apr 18, 2013 at 11:03 AM, Christian Ruppert wrote: > We would like to avoid the use of Linux pin numbers in the device tree. > Customers are used to physical pin numbers and exposing the logical > Linux-internal numbering scheme through the device tree would generate > quite some confusio

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-04-18 Thread Christian Ruppert
Dear Stephen and Linus, I am responding to this message because it touches the core issue I was wondering about when integrating pinctrl with GPIO. I think all unrelated comments in your other messages are valid and will be addressed in the next iteration of both drivers. On Wed, Apr 17, 2013 at

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-04-17 Thread Stephen Warren
On 04/10/2013 09:45 AM, Christian Ruppert wrote: > The pinmux driver of the Abilis Systems TB10x platform based on ARC700 CPUs. > Used to control the pinmux and is a prerequisite for the GPIO driver. Linus already did a review of this, but I have a few extra comments: > diff --git a/Documentation

Re: [PATCH 1/2] pinmux: Add TB10x pinmux driver

2013-04-17 Thread Linus Walleij
On Wed, Apr 10, 2013 at 5:45 PM, Christian Ruppert wrote: > The pinmux driver of the Abilis Systems TB10x platform based on ARC700 CPUs. > Used to control the pinmux and is a prerequisite for the GPIO driver. > > Signed-off-by: Christian Ruppert > Signed-off-by: Pierrick Hascoet Please include