From: Yi Zhang <yizhang@xxxxxxxxxxx> there may be more than one i2c bus needs to be reset, add i2c bus number as parameter Change-Id: I74456743bf640efe2fbf0664e8212be161cef424 Signed-off-by: Yi Zhang <yizhang@xxxxxxxxxxx> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index f3811d5..3346fef 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -289,7 +289,7 @@ static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why) printk("\n"); if (strcmp(why, "exhausted retries") != 0) { if (plat && plat->i2c_bus_reset) - plat->i2c_bus_reset(); + plat->i2c_bus_reset(i2c->adap.nr); /* reset i2c contorler when it's fail */ i2c_pxa_reset(i2c); } diff --git a/include/linux/i2c/pxa-i2c.h b/include/linux/i2c/pxa-i2c.h index a247f48..04406ba 100644 --- a/include/linux/i2c/pxa-i2c.h +++ b/include/linux/i2c/pxa-i2c.h @@ -72,7 +72,7 @@ struct i2c_pxa_platform_data { void (*hardware_lock)(void); void (*hardware_unlock)(void); int (*hardware_trylock)(void); - void (*i2c_bus_reset) (void); + void (*i2c_bus_reset)(int i2c_bus_num); }; extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html