Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-12-01 Thread Linus Walleij
On Sat, Dec 1, 2012 at 8:34 PM, Linus Walleij wrote: > The crucial question is: can the STMPE controllers be > used for GPIO, PWM, keypad and touchscreen at the > *same time* or are they nailed to *one* usecase during > electronics design? Looking closer at the datasheet it seems to mux pins on

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-12-01 Thread Linus Walleij
On Mon, Nov 26, 2012 at 12:28 PM, Lee Jones wrote: > On Fri, 23 Nov 2012, Shiraz Hashim wrote: [About st-norequest-mask] >> This is a board dependent parameter which just informs gpio driver >> about pins, which must not be requested. It may happen for a stmpe >> variant where such gpio pins are

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-12-01 Thread Shiraz Hashim
On Sat, Dec 1, 2012 at 10:05 PM, Linus Walleij wrote: > On Mon, Nov 26, 2012 at 12:32 PM, Shiraz Hashim wrote: >> On Mon, Nov 26, 2012 at 11:28:23AM +, Lee Jones wrote: >>> >>> Doesn't pinctrl normally handle this kind of stuff? >> >> Yes, but I think it is only for managing the SoC and its p

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-12-01 Thread Linus Walleij
On Mon, Nov 26, 2012 at 12:32 PM, Shiraz Hashim wrote: > On Mon, Nov 26, 2012 at 11:28:23AM +, Lee Jones wrote: >> >> Doesn't pinctrl normally handle this kind of stuff? > > Yes, but I think it is only for managing the SoC and its pads. No pinctrl is also for off-SoC pin controllers, you can

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-26 Thread Shiraz Hashim
On Mon, Nov 26, 2012 at 11:28:23AM +, Lee Jones wrote: > On Fri, 23 Nov 2012, Shiraz Hashim wrote: > > > On Fri, Nov 23, 2012 at 12:14:13PM +, Lee Jones wrote: > > > > >> + if (np) > > > > >> + of_property_read_u32(np, "st,norequest-mask", > > > > >> +

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-26 Thread Lee Jones
On Fri, 23 Nov 2012, Shiraz Hashim wrote: > On Fri, Nov 23, 2012 at 12:14:13PM +, Lee Jones wrote: > > > >> + if (np) > > > >> + of_property_read_u32(np, "st,norequest-mask", > > > >> + &pdata->norequest_mask); > > > > > > > >

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Shiraz Hashim
On Fri, Nov 23, 2012 at 12:14:13PM +, Lee Jones wrote: > > >> + if (np) > > >> + of_property_read_u32(np, "st,norequest-mask", > > >> + &pdata->norequest_mask); > > > > > > Can you explain to me what this does? > > > > You mea

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Lee Jones
On Fri, 23 Nov 2012, Viresh Kumar wrote: > On 23 November 2012 17:44, Lee Jones wrote: > > I'm saying, just leave it where it is. > > So you are suggesting this code: > > stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; > >if (pdata) >stmpe_gpio->norequest

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Viresh Kumar
On 23 November 2012 17:44, Lee Jones wrote: > I'm saying, just leave it where it is. So you are suggesting this code: stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; if (pdata) stmpe_gpio->norequest_mask = pdata->norequest_mask; else if (np)

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Lee Jones
> >> - stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1; > > > > Why have you deleted this? > > > >> + > >> + if (pdata) { > >> + stmpe_gpio->norequest_mask = pdata->norequest_mask; > >> + stmpe_gpio->chip.base = pdata->gpio_base; > > > > Then added this? > > >

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Viresh Kumar
On 23 November 2012 16:11, Lee Jones wrote: >> > +++ b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt >> > @@ -0,0 +1,18 @@ >> > +STMPE gpio >> > +-- >> > + >> > +Required properties: >> > + - compatible: "st,stmpe-gpio" > > ... but this is wrong. > >> > +Example: >> > + stmpe_gpi

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Viresh Kumar
On 23 November 2012 16:04, Lee Jones wrote: > On Fri, 23 Nov 2012, Viresh Kumar wrote: >> diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c >> static int __devinit stmpe_gpio_probe(struct platform_device *pdev) >> { >> - stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Lee Jones
> > static struct mfd_cell stmpe_gpio_cell = { > > .name = "stmpe-gpio", > > + .of_compatible = "st,stmpe-gpio", > > There's no need for any of the STMPE to have their own compatible > string, as they are MFD devices. They are registered as platform > devices from the MFD subsyst

Re: [PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-23 Thread Lee Jones
On Fri, 23 Nov 2012, Viresh Kumar wrote: > From: Vipul Kumar Samar > > This patch allows the STMPE GPIO driver to be successfully probed and > initialised when Device Tree support is enabled. Bindings are mentioned in > Documentation too. > > Signed-off-by: Vipul Kumar Samar > Signed-off-by: V

[PATCH] gpio: stmpe: Add DT support for stmpe gpio

2012-11-22 Thread Viresh Kumar
From: Vipul Kumar Samar This patch allows the STMPE GPIO driver to be successfully probed and initialised when Device Tree support is enabled. Bindings are mentioned in Documentation too. Signed-off-by: Vipul Kumar Samar Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/gpio/g