diff options
author | Jean Delvare <khali@linux-fr.org> | 2012-10-05 16:23:54 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-10-05 16:23:54 -0400 |
commit | 600a711cfeb10769e386c4ce7d39e9f0cc4b471a (patch) | |
tree | a922d6b426495e70e93d6c144dc15fad22c9d2ae /Documentation/i2c | |
parent | e7ee51405835cac72e7b6e0ff26dba608cf186cc (diff) |
i2c-mux-gpio: Update documentation
* Document the possibility to pass relative GPIO pin numbers.
* Document what platform device IDs to use, so that they do not
collide.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Korsgaard <peter.korsgaard@barco.com>
Diffstat (limited to 'Documentation/i2c')
-rw-r--r-- | Documentation/i2c/muxes/i2c-mux-gpio | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/i2c/muxes/i2c-mux-gpio b/Documentation/i2c/muxes/i2c-mux-gpio index bd9b2299b73..d4d91a53fc3 100644 --- a/Documentation/i2c/muxes/i2c-mux-gpio +++ b/Documentation/i2c/muxes/i2c-mux-gpio | |||
@@ -63,3 +63,21 @@ static struct platform_device myboard_i2cmux = { | |||
63 | .platform_data = &myboard_i2cmux_data, | 63 | .platform_data = &myboard_i2cmux_data, |
64 | }, | 64 | }, |
65 | }; | 65 | }; |
66 | |||
67 | If you don't know the absolute GPIO pin numbers at registration time, | ||
68 | you can instead provide a chip name (.chip_name) and relative GPIO pin | ||
69 | numbers, and the i2c-gpio-mux driver will do the work for you, | ||
70 | including deferred probing if the GPIO chip isn't immediately | ||
71 | available. | ||
72 | |||
73 | Device Registration | ||
74 | ------------------- | ||
75 | |||
76 | When registering your i2c-gpio-mux device, you should pass the number | ||
77 | of any GPIO pin it uses as the device ID. This guarantees that every | ||
78 | instance has a different ID. | ||
79 | |||
80 | Alternatively, if you don't need a stable device name, you can simply | ||
81 | pass PLATFORM_DEVID_AUTO as the device ID, and the platform core will | ||
82 | assign a dynamic ID to your device. If you do not know the absolute | ||
83 | GPIO pin numbers at registration time, this is even the only option. | ||