Re: [PATCH v2] power: bq20z75: change to platform driver

From: Anton Vorontsov
Date: Mon Feb 28 2011 - 09:04:56 EST

On Thu, Feb 24, 2011 at 04:49:37PM -0800, Rhyland Klein wrote:
> On Thu, 2011-02-24 at 15:48 -0800, Rhyland Klein wrote:
> > From: Rhyland Klein <rklein@xxxxxxxxxx>
> >
> > This change switches the bq20z75 i2c driver into a platform driver
> > and adds support for an optional battery detect gpio. Now the driver also
> > signals when the battery is inserted or removed.
> >
> > I also added a retry mechanism so that for boards where there may be
> > intermittent i2c issues, retries can be used to avoid spurious failures.
> >
> > Signed-off-by: Rhyland Klein <rklein@xxxxxxxxxx>
> > ---
> Anton, are you going to have a chance to review this? I have one more
> patch to submit but I was waiting for this to go in first.

Sorry for the delay.

The main problem with this patch is that it does too many things.
It should be separated into three patches:

1. Convert the driver into a platform driver;
2. Add support for detect gpio;
3. Add retry machanism.

But still, why are you converting the i2c driver into a platform driver?
To pass the GPIOs via platform data? You can do this with I2C driver as

struct i2c_board_info {
void *platform_data;


Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at