Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-11-05 Thread Tony Lindgren
* Linus Walleij [121104 09:39]: > On Tue, Oct 30, 2012 at 3:12 PM, AnilKumar, Chimata wrote: > > I have two options now > > - add only default states for now, I can add reset of > > the state details once suspend/resume is supported. > > - add same values in all the states, modify those once > >

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-11-04 Thread AnilKumar, Chimata
On Sun, Nov 04, 2012 at 23:07:44, Linus Walleij wrote: > On Tue, Oct 30, 2012 at 3:12 PM, AnilKumar, Chimata wrote: > > > I completely understood this named modes, I have added named > > modes like this in am335x-xxx.dts files > > I do not understand how the pinctrl-single dts files work actuall

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-11-04 Thread Linus Walleij
On Tue, Oct 30, 2012 at 3:12 PM, AnilKumar, Chimata wrote: > I completely understood this named modes, I have added named > modes like this in am335x-xxx.dts files I do not understand how the pinctrl-single dts files work actually, so please get Tony to review this part. > I think "pinctrl-1" s

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-30 Thread AnilKumar, Chimata
On Wed, Oct 03, 2012 at 18:06:10, Linus Walleij wrote: > On Wed, Oct 3, 2012 at 12:52 PM, AnilKumar, Chimata wrote: > > On Tue, Oct 02, 2012 at 01:29:37, Linus Walleij wrote: > > >> This is what we're doing for ux500 and should be a good model. > > > > I have looked into this, but not seen any na

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-03 Thread Tony Lindgren
* AnilKumar, Chimata [121003 03:53]: > On Tue, Oct 02, 2012 at 01:29:37, Linus Walleij wrote: > > On Mon, Oct 1, 2012 at 5:44 PM, Tony Lindgren wrote: > > > > >> OK that is typical pinctrl driver implementation work. > > >> I hope Tony can advice on this? > > > > > > I think we're best off to ju

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-03 Thread Linus Walleij
On Wed, Oct 3, 2012 at 12:52 PM, AnilKumar, Chimata wrote: > On Tue, Oct 02, 2012 at 01:29:37, Linus Walleij wrote: >> This is what we're doing for ux500 and should be a good model. > > I have looked into this, but not seen any named modes. OK maybe it's not easy to find. If you look into: arch/

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-03 Thread AnilKumar, Chimata
On Tue, Oct 02, 2012 at 01:29:37, Linus Walleij wrote: > On Mon, Oct 1, 2012 at 5:44 PM, Tony Lindgren wrote: > > >> OK that is typical pinctrl driver implementation work. > >> I hope Tony can advice on this? > > > > I think we're best off to just stick to alternative named modes > > passed from

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-01 Thread Linus Walleij
On Mon, Oct 1, 2012 at 5:44 PM, Tony Lindgren wrote: >> OK that is typical pinctrl driver implementation work. >> I hope Tony can advice on this? > > I think we're best off to just stick to alternative named modes > passed from device tree. For example, for GPIO wake-ups you can > have named mode

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-01 Thread Tony Lindgren
* Linus Walleij [121001 01:25]: > On Mon, Oct 1, 2012 at 9:03 AM, AnilKumar, Chimata wrote: > > >I have gone through the "Don Aisheng" patch series, which > > adds "pinctrl_dt_add_gpio_ranges" support but not accepted > > yet. With this patch series we can overcome the driver changes. > > O

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-01 Thread Linus Walleij
On Mon, Oct 1, 2012 at 9:03 AM, AnilKumar, Chimata wrote: >I have gone through the "Don Aisheng" patch series, which > adds "pinctrl_dt_add_gpio_ranges" support but not accepted > yet. With this patch series we can overcome the driver changes. OK then this is the direction we need to go. >

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-10-01 Thread AnilKumar, Chimata
+Don Aisheng On Tue, Sep 11, 2012 at 01:10:12, Linus Walleij wrote: > On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > device pointer, pinctrl driver configure SoC pins to GPIO > > mode according to definitions provided i

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-10 Thread Stephen Warren
On 09/10/2012 01:34 PM, Linus Walleij wrote: > On Mon, Sep 10, 2012 at 7:41 PM, Stephen Warren wrote: >> On 09/10/2012 09:23 AM, Linus Walleij wrote: > >> That seems like exactly what we were trying to avoid when we added the >> possibility for GPIO to call into pinctrl. >> >> Documentation/gpio.

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-10 Thread Linus Walleij
On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > Adopt pinctrl support to leds-gpio driver based on leds-gpio > device pointer, pinctrl driver configure SoC pins to GPIO > mode according to definitions provided in .dts file. > > Signed-off-by: AnilKumar Ch So looking back at this after St

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-10 Thread Linus Walleij
On Mon, Sep 10, 2012 at 7:41 PM, Stephen Warren wrote: > On 09/10/2012 09:23 AM, Linus Walleij wrote: > That seems like exactly what we were trying to avoid when we added the > possibility for GPIO to call into pinctrl. > > Documentation/gpio.txt already contains: > >> For GPIOs that use pins kno

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-10 Thread Stephen Warren
On 09/10/2012 09:23 AM, Linus Walleij wrote: > On Sun, Sep 9, 2012 at 1:44 AM, Domenico Andreoli wrote: >> On Fri, Sep 07, 2012 at 11:57:59PM +0200, Linus Walleij wrote: >>> >>> If all you need to to is to multiplex the pins into GPIO mode, >>> then the gpio_get() call on this driver *can* call th

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-10 Thread Linus Walleij
On Sun, Sep 9, 2012 at 1:44 AM, Domenico Andreoli wrote: > On Fri, Sep 07, 2012 at 11:57:59PM +0200, Linus Walleij wrote: >> >> If all you need to to is to multiplex the pins into GPIO mode, >> then the gpio_get() call on this driver *can* call through to >> pinctrl_request_gpio() which will in tu

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-08 Thread Domenico Andreoli
On Fri, Sep 07, 2012 at 11:57:59PM +0200, Linus Walleij wrote: > On Fri, Sep 7, 2012 at 6:00 PM, Domenico Andreoli wrote: > > On Fri, Sep 07, 2012 at 02:30:59PM +, AnilKumar, Chimata wrote: > > >> How can gpio driver knows that leds-gpio driver require > >> these 4 pins? > > > > because leds-

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Linus Walleij
On Fri, Sep 7, 2012 at 6:35 PM, Tony Lindgren wrote: > In the pure GPIO pins only case it could be all done in the GPIO controller, > but it's probably best to have the pins muxed by the drivers using them. Yes, that's an easier way to say the long unreadable thing I just posted ... > Some driv

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Linus Walleij
On Fri, Sep 7, 2012 at 6:00 PM, Domenico Andreoli wrote: > On Fri, Sep 07, 2012 at 02:30:59PM +, AnilKumar, Chimata wrote: >> How can gpio driver knows that leds-gpio driver require >> these 4 pins? > > because leds-gpio requests each gpio (specified in the DT against a specific > gpio contro

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Tony Lindgren
* Linus Walleij [120907 14:40]: > On Thu, Sep 6, 2012 at 7:45 PM, Tony Lindgren wrote: > > >> > The warning should be pinctrl related as the pinctrl drivers may not be > >> > device tree based drivers. > >> > >> Exactly my concern. Also the warning shouldnt be present on systems where > >> pinct

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Linus Walleij
On Thu, Sep 6, 2012 at 7:45 PM, Tony Lindgren wrote: >> > The warning should be pinctrl related as the pinctrl drivers may not be >> > device tree based drivers. >> >> Exactly my concern. Also the warning shouldnt be present on systems where >> pinctrl is disabled. > > But pinctrl_get_select() re

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Linus Walleij
On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > Adopt pinctrl support to leds-gpio driver based on leds-gpio > device pointer, pinctrl driver configure SoC pins to GPIO > mode according to definitions provided in .dts file. > > Signed-off-by: AnilKumar Ch Looks good from a pinctrl point

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Tony Lindgren
* Domenico Andreoli [120907 09:01]: > > So is this the preferred way to attach gpio users to gpio provides in DT > whenever gpios are muxed? > > I would well see these info hidden in the gpio controller so, at least > for gpios, no magic numbers would be required in the DT (except the gpio > num

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Domenico Andreoli
On Fri, Sep 07, 2012 at 02:30:59PM +, AnilKumar, Chimata wrote: > On Fri, Sep 07, 2012 at 16:32:51, Domenico Andreoli wrote: > > On Fri, Sep 07, 2012 at 09:10:50AM +, AnilKumar, Chimata wrote: > > > On Fri, Sep 07, 2012 at 14:18:39, Domenico Andreoli wrote: > > > > On Sat, Sep 1, 2012 at 10

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread AnilKumar, Chimata
On Fri, Sep 07, 2012 at 16:32:51, Domenico Andreoli wrote: > On Fri, Sep 07, 2012 at 09:10:50AM +, AnilKumar, Chimata wrote: > > Hi Domenico, > > Hi, > > > On Fri, Sep 07, 2012 at 14:18:39, Domenico Andreoli wrote: > > > On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > > > > Adopt pinc

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Domenico Andreoli
On Fri, Sep 07, 2012 at 09:10:50AM +, AnilKumar, Chimata wrote: > Hi Domenico, Hi, > On Fri, Sep 07, 2012 at 14:18:39, Domenico Andreoli wrote: > > On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > > device pointer, pi

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread AnilKumar, Chimata
Hi Domenico, On Fri, Sep 07, 2012 at 14:18:39, Domenico Andreoli wrote: > On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > device pointer, pinctrl driver configure SoC pins to GPIO > > mode according to definitions provided

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Domenico Andreoli
On Sat, Sep 1, 2012 at 10:16 AM, AnilKumar Ch wrote: > Adopt pinctrl support to leds-gpio driver based on leds-gpio > device pointer, pinctrl driver configure SoC pins to GPIO > mode according to definitions provided in .dts file. Shouldn't be the interaction with the pinctrl layer left to gpioli

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread Marek Vasut
Dear AnilKumar, Chimata, > On Fri, Sep 07, 2012 at 05:39:35, Marek Vasut wrote: > > Dear Tony Lindgren, > > > > > * Marek Vasut [120905 19:05]: > > > > Hi Tony, > > > > > > > > > * Marek Vasut [120904 20:13]: > > > > > > Dear Bryan Wu, > > > > > > > > > > > > > On Sat, Sep 1, 2012 at 4:16 PM,

RE: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-07 Thread AnilKumar, Chimata
On Fri, Sep 07, 2012 at 05:39:35, Marek Vasut wrote: > Dear Tony Lindgren, > > > * Marek Vasut [120905 19:05]: > > > Hi Tony, > > > > > > > * Marek Vasut [120904 20:13]: > > > > > Dear Bryan Wu, > > > > > > > > > > > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch > > > > > > wrote: > > > > > >

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-06 Thread Marek Vasut
Dear Tony Lindgren, > * Marek Vasut [120905 19:05]: > > Hi Tony, > > > > > * Marek Vasut [120904 20:13]: > > > > Dear Bryan Wu, > > > > > > > > > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch wrote: > > > > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > > > > > device poi

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-06 Thread Tony Lindgren
* Marek Vasut [120905 19:05]: > Hi Tony, > > > * Marek Vasut [120904 20:13]: > > > Dear Bryan Wu, > > > > > > > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch wrote: > > > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > > > > device pointer, pinctrl driver configure SoC pins

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-05 Thread Marek Vasut
Hi Tony, > * Marek Vasut [120904 20:13]: > > Dear Bryan Wu, > > > > > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch wrote: > > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > > > device pointer, pinctrl driver configure SoC pins to GPIO > > > > mode according to definitions

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-05 Thread Tony Lindgren
* Marek Vasut [120904 20:13]: > Dear Bryan Wu, > > > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch wrote: > > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > > device pointer, pinctrl driver configure SoC pins to GPIO > > > mode according to definitions provided in .dts file. >

Re: [PATCH v2] leds: leds-gpio: adopt pinctrl support

2012-09-04 Thread Marek Vasut
Dear Bryan Wu, > On Sat, Sep 1, 2012 at 4:16 PM, AnilKumar Ch wrote: > > Adopt pinctrl support to leds-gpio driver based on leds-gpio > > device pointer, pinctrl driver configure SoC pins to GPIO > > mode according to definitions provided in .dts file. > > Thanks for this, actually Marek Vasut s