RE: [PATCH 02/11] GPIO: DA9052 GPIO module v1

From: Ashish Jangam
Date: Thu Jun 30 2011 - 07:40:51 EST


> -----Original Message-----
> From: Mark Brown [mailto:broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, June 30, 2011 11:07 AM
> To: Ashish Jangam
> Cc: jic23@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Dajun; grant@xxxxxxxxxxxx
> Subject: Re: [PATCH 02/11] GPIO: DA9052 GPIO module v1
>
> On Wed, Jun 29, 2011 at 07:23:11PM +0530, ashishj3 wrote:
>
> > DA9052 PMIC has 16 bit GPIO bus for peripheral control.
> >
> > This patch add support for the GPIO pins on the DA9052.
>
> > + gpio->da9052 = dev_get_drvdata(pdev->dev.parent);
> > + pdata = gpio->da9052->dev->platform_data;
> > +
> > + if (pdata == NULL) {
> > + dev_err(&pdev->dev, "Failed no platform data for GPIO\n");
> > + ret = -ENOMEM;
> > + goto err_mem;
> > + }
>
> Why insist on platform data? gpiolib can dynamically allocate a GPIO
> range to the device.
Do you mean to use gpiochip_reserve() in machine file and not to have ngpio
and base defined in GPIO platform driver but, this will fail the call to gpiochip_add()?
Can you elaborate on it?



èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—