RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-15 Thread Chen, Alvin
> > > > > > > > > static int dwapb_gpio_probe(struct platform_device *pdev) { > > > > > + int i; > > > > > struct resource *res; > > > > > struct dwapb_gpio *gpio; > > > > > - struct device_node *np; > > > > > int err; > > > > > - unsigned int offs = 0; > > > > > +

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-14 Thread Chen, Alvin
> > > > > > static int dwapb_gpio_probe(struct platform_device *pdev) { > > > > + int i; > > > > struct resource *res; > > > > struct dwapb_gpio *gpio; > > > > - struct device_node *np; > > > > int err; > > > > - unsigned int offs = 0; > > > > + str

Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-11 Thread atull
On Thu, 11 Sep 2014, Shevchenko, Andriy wrote: > On Wed, 2014-09-10 at 14:11 -0500, atull wrote: > > [] > > > > static int dwapb_gpio_probe(struct platform_device *pdev) > > > { > > > + int i; > > > struct resource *res; > > > struct dwapb_gpio *gpio; > > > - struct device_node *np; > > >

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-11 Thread atull
On Thu, 11 Sep 2014, Chen, Alvin wrote: > > > > > > Hi Alvin, > > > > > > I did a quick test and this looks like it works for me (with device tree). > > > I had a couple of small fixes below. > > It is very appreciated to help testing. Sure. Thanks for adding features to the driver! > > > > >

Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-11 Thread Shevchenko, Andriy
On Wed, 2014-09-10 at 14:11 -0500, atull wrote: [] > > static int dwapb_gpio_probe(struct platform_device *pdev) > > { > > + int i; > > struct resource *res; > > struct dwapb_gpio *gpio; > > - struct device_node *np; > > int err; > > - unsigned int offs = 0; > > + struct dev

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-10 Thread Chen, Alvin
> > > > Hi Alvin, > > > > I did a quick test and this looks like it works for me (with device tree). > > I had a couple of small fixes below. > It is very appreciated to help testing. > > > > Alan > > > > > > > > - port->bgc.gc.ngpio = ngpio; > > > - port->bgc.gc.of_node = port_np; > > > +#ifdef

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-10 Thread Chen, Alvin
> > Hi Alvin, > > I did a quick test and this looks like it works for me (with device tree). > I had a couple of small fixes below. It is very appreciated to help testing. > Alan > > > > > - port->bgc.gc.ngpio = ngpio; > > - port->bgc.gc.of_node = port_np; > > +#ifdef CONFIG_OF_GPIO > > +

Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-10 Thread atull
On Tue, 9 Sep 2014, Weike Chen wrote: > The Synopsys DesignWare APB GPIO driver only supports open firmware devices. > But, like Intel Quark X1000 SOC, which has a single PCI function exporting > a GPIO and an I2C controller, it is a Multifunction device. This patch is > to enable the current Syno

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-10 Thread Chen, Alvin
> > > You cover this specific dependencies with inline ifdefs, but you > > > lose the CONFIG_OF depends by dropping it, and there are no such > > > checks in the probe routine. Assumptions of OF are not limited to probe in > this driver. > > > > > > While I would like to see this assumption properl

Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-09 Thread Darren Hart
On Wed, Sep 10, 2014 at 12:34:50AM +, Chen, Alvin wrote: > > >@@ -136,7 +136,6 @@ config GPIO_DWAPB > > > tristate "Synopsys DesignWare APB GPIO driver" > > > select GPIO_GENERIC > > > select GENERIC_IRQ_CHIP > > >- depends on OF_GPIO > > > > You cover this specific dependencies with in

RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-09 Thread Chen, Alvin
> >@@ -136,7 +136,6 @@ config GPIO_DWAPB > > tristate "Synopsys DesignWare APB GPIO driver" > > select GPIO_GENERIC > > select GENERIC_IRQ_CHIP > >-depends on OF_GPIO > > You cover this specific dependencies with inline ifdefs, but you lose the > CONFIG_OF depends by dropping it, a

Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-09 Thread Darren Hart
On 9/9/14, 11:07, "Weike Chen" wrote: >The Synopsys DesignWare APB GPIO driver only supports open firmware >devices. >But, like Intel Quark X1000 SOC, which has a single PCI function exporting >a GPIO and an I2C controller, it is a Multifunction device. This patch is >to enable the current Synops

[PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver

2014-09-09 Thread Weike Chen
The Synopsys DesignWare APB GPIO driver only supports open firmware devices. But, like Intel Quark X1000 SOC, which has a single PCI function exporting a GPIO and an I2C controller, it is a Multifunction device. This patch is to enable the current Synopsys DesignWare APB GPIO driver to support the