Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread Sebastian Hesselbarth
On 11/21/2013 12:40 AM, Rob Herring wrote: On Wed, Nov 20, 2013 at 3:47 PM, delicious quinoa wrote: On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth wrote: On 11/06/13 23:49, Alan Tull wrote: [snip] BTW, what if we get rid of port child nodes completely and rather use: gpio:

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread Rob Herring
On Wed, Nov 20, 2013 at 3:47 PM, delicious quinoa wrote: > On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth > wrote: >> On 11/06/13 23:49, Alan Tull wrote: [snip] >> BTW, what if we get rid of port child nodes completely and rather >> use: >> >> gpio: gpio-controller@2 { >>

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread delicious quinoa
On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth wrote: > On 11/06/13 23:49, Alan Tull wrote: >> >> From: Jamie Iles >> >> The Synopsys DesignWare block is used in some ARM devices (picoxcell) >> and can be configured to provide multiple banks of GPIO pins. >> >> Signed-off-by: Alan Tull

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread delicious quinoa
On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth sebastian.hesselba...@gmail.com wrote: On 11/06/13 23:49, Alan Tull wrote: From: Jamie Iles ja...@jamieiles.com The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread Rob Herring
On Wed, Nov 20, 2013 at 3:47 PM, delicious quinoa delicious.qui...@gmail.com wrote: On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth sebastian.hesselba...@gmail.com wrote: On 11/06/13 23:49, Alan Tull wrote: [snip] BTW, what if we get rid of port child nodes completely and rather use:

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-20 Thread Sebastian Hesselbarth
On 11/21/2013 12:40 AM, Rob Herring wrote: On Wed, Nov 20, 2013 at 3:47 PM, delicious quinoa delicious.qui...@gmail.com wrote: On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth sebastian.hesselba...@gmail.com wrote: On 11/06/13 23:49, Alan Tull wrote: [snip] BTW, what if we get rid of

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-07 Thread delicious quinoa
On Wed, Nov 6, 2013 at 5:44 PM, Sebastian Hesselbarth wrote: >>> +struct dwapb_gpio { >>> + struct device *dev; >>> + void __iomem*regs; >>> + struct dwapb_gpio_port *ports; >>> + unsigned intnr_ports; >>> + struct irq_domain

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-07 Thread Sebastian Hesselbarth
On 11/06/13 23:49, Alan Tull wrote: From: Jamie Iles The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO pins. Signed-off-by: Alan Tull v6: - (atull) squash the set of patches Much better to review, thanks.

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-07 Thread Sebastian Hesselbarth
On 11/06/13 23:49, Alan Tull wrote: From: Jamie Iles ja...@jamieiles.com The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO pins. Signed-off-by: Alan Tull at...@altera.com v6: - (atull) squash the set of patches

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-07 Thread delicious quinoa
On Wed, Nov 6, 2013 at 5:44 PM, Sebastian Hesselbarth sebastian.hesselba...@gmail.com wrote: +struct dwapb_gpio { + struct device *dev; + void __iomem*regs; + struct dwapb_gpio_port *ports; + unsigned intnr_ports; + struct

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Sebastian Hesselbarth
On 11/07/2013 12:34 AM, Jamie Iles wrote: On Wed, Nov 06, 2013 at 04:49:42PM -0600, Alan Tull wrote: diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c new file mode 100644 index 000..7957dfd --- /dev/null +++ b/drivers/gpio/gpio-dwapb.c @@ -0,0 +1,458 @@ +/* + * Copyright

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Jamie Iles
Hi Alan, On Wed, Nov 06, 2013 at 04:49:42PM -0600, Alan Tull wrote: > diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c > new file mode 100644 > index 000..7957dfd > --- /dev/null > +++ b/drivers/gpio/gpio-dwapb.c > @@ -0,0 +1,458 @@ > +/* > + * Copyright (c) 2011 Jamie Iles

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Sebastian Hesselbarth
On 11/07/2013 12:18 AM, delicious quinoa wrote: On Wed, Nov 6, 2013 at 5:09 PM, Fabio Estevam wrote: On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull wrote: + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + gpio->regs = devm_ioremap_resource(>dev, res); + if

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread delicious quinoa
On Wed, Nov 6, 2013 at 5:09 PM, Fabio Estevam wrote: > On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull wrote: > >> + >> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> + gpio->regs = devm_ioremap_resource(>dev, res); >> + if (!gpio->regs) { >> + err =

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Fabio Estevam
On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull wrote: > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + gpio->regs = devm_ioremap_resource(>dev, res); > + if (!gpio->regs) { > + err = -ENOMEM; > + goto out_free_ports; The correct way to

[PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Alan Tull
From: Jamie Iles The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO pins. Signed-off-by: Alan Tull v6: - (atull) squash the set of patches - use linear irq domain - build fixes. Original driver was

[PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Alan Tull
From: Jamie Iles ja...@jamieiles.com The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO pins. Signed-off-by: Alan Tull at...@altera.com v6: - (atull) squash the set of patches - use linear irq domain

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Fabio Estevam
On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull delicious.qui...@gmail.com wrote: + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + gpio-regs = devm_ioremap_resource(pdev-dev, res); + if (!gpio-regs) { + err = -ENOMEM; + goto out_free_ports;

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread delicious quinoa
On Wed, Nov 6, 2013 at 5:09 PM, Fabio Estevam feste...@gmail.com wrote: On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull delicious.qui...@gmail.com wrote: + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + gpio-regs = devm_ioremap_resource(pdev-dev, res); + if

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Sebastian Hesselbarth
On 11/07/2013 12:18 AM, delicious quinoa wrote: On Wed, Nov 6, 2013 at 5:09 PM, Fabio Estevam feste...@gmail.com wrote: On Wed, Nov 6, 2013 at 8:49 PM, Alan Tull delicious.qui...@gmail.com wrote: + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + gpio-regs =

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Jamie Iles
Hi Alan, On Wed, Nov 06, 2013 at 04:49:42PM -0600, Alan Tull wrote: diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c new file mode 100644 index 000..7957dfd --- /dev/null +++ b/drivers/gpio/gpio-dwapb.c @@ -0,0 +1,458 @@ +/* + * Copyright (c) 2011 Jamie Iles + * +

Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block

2013-11-06 Thread Sebastian Hesselbarth
On 11/07/2013 12:34 AM, Jamie Iles wrote: On Wed, Nov 06, 2013 at 04:49:42PM -0600, Alan Tull wrote: diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c new file mode 100644 index 000..7957dfd --- /dev/null +++ b/drivers/gpio/gpio-dwapb.c @@ -0,0 +1,458 @@ +/* + * Copyright