Hi again Peter and Mark, On Wed, 25 Jul 2012 14:44:09 +0200, Jean Delvare wrote: > If a per-driver IDA isn't acceptable, then we can go for a global IDA, > but then we can't re-use pdev->id == -1 for it. We'd have to introduce > pdev->id == -2 for drivers which want a dynamically allocated unique > ID. Actually this might be a better approach, as it's less intrusive. I slept on it and came up with what I think is an easier and more elegant solution. We could simply agree on using GPIO pin numbers as platform device IDs, as two i2c-gpio-mux instances can't control the same GPIO pin. * * * * * From: Jean Delvare <khali@xxxxxxxxxxxx> Subject: i2c-mux-gpio: Document what device ID to use We need a convention for i2c-mux-gpio platform device IDs so that they do not collide. Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx> Cc: Peter Korsgaard <peter.korsgaard@xxxxxxxxx> --- Documentation/i2c/muxes/i2c-mux-gpio | 7 +++++++ 1 file changed, 7 insertions(+) --- linux-3.5.orig/Documentation/i2c/muxes/i2c-mux-gpio 2012-07-21 22:58:29.000000000 +0200 +++ linux-3.5/Documentation/i2c/muxes/i2c-mux-gpio 2012-07-26 08:41:23.291014194 +0200 @@ -63,3 +63,10 @@ static struct platform_device myboard_i2 .platform_data = &myboard_i2cmux_data, }, }; + +Device Registration +------------------- + +When registering your i2c-gpio-mux device, you should pass the number +of any GPIO pin it uses as the device ID. This guarantees that every +instance has a different ID. -- Jean Delvare -- 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