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: gpio-co

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 { >> com

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-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-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 (c

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(&pdev->dev, res); + if (!gpio

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(&pdev->dev, res); >> + if (!gpio->regs) { >> + err = -E

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(&pdev->dev, res); > + if (!gpio->regs) { > + err = -ENOMEM; > + goto out_free_ports; The correct way