From ac423a44b571983f007dfbf65761385bff66d4da Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 5 Oct 2012 22:23:54 +0200 Subject: [PATCH] --- yaml --- r: 331551 b: refs/heads/master c: 600a711cfeb10769e386c4ce7d39e9f0cc4b471a h: refs/heads/master i: 331549: de7327c1d8b73cd31813acac7541c321261e0c9c 331547: 05f45980d3ee2c0b7999cc68c749f09ffd1a7d17 331543: 22eb7ee3169d11d54f9fd2b49bbcf52abaf2acef 331535: 4f0a70ce33b7c3cfb6845dc3f58190aa1672f473 331519: 37a487763bbd5bb8d0efc5b187ceca33ecae96c7 v: v3 --- [refs] | 2 +- trunk/Documentation/i2c/muxes/i2c-mux-gpio | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 97aaf67c0daf..e9e511357e83 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7ee51405835cac72e7b6e0ff26dba608cf186cc +refs/heads/master: 600a711cfeb10769e386c4ce7d39e9f0cc4b471a diff --git a/trunk/Documentation/i2c/muxes/i2c-mux-gpio b/trunk/Documentation/i2c/muxes/i2c-mux-gpio index bd9b2299b739..d4d91a53fc39 100644 --- a/trunk/Documentation/i2c/muxes/i2c-mux-gpio +++ b/trunk/Documentation/i2c/muxes/i2c-mux-gpio @@ -63,3 +63,21 @@ static struct platform_device myboard_i2cmux = { .platform_data = &myboard_i2cmux_data, }, }; + +If you don't know the absolute GPIO pin numbers at registration time, +you can instead provide a chip name (.chip_name) and relative GPIO pin +numbers, and the i2c-gpio-mux driver will do the work for you, +including deferred probing if the GPIO chip isn't immediately +available. + +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. + +Alternatively, if you don't need a stable device name, you can simply +pass PLATFORM_DEVID_AUTO as the device ID, and the platform core will +assign a dynamic ID to your device. If you do not know the absolute +GPIO pin numbers at registration time, this is even the only option.