summaryrefslogtreecommitdiffstats
path: root/include/dm/uclass-id.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-03 08:19:21 -0600
committerSimon Glass <sjg@chromium.org>2015-08-05 21:06:10 -0600
commit3d1957f0ea0133ec06f9c6fd85dc1acdf66ad29c (patch)
tree9c049a7b6eac29145dc8e6ffdbfdda92387e010b /include/dm/uclass-id.h
parentdf358c6beca8f7cc2f2b67c54f0bf255ebd5cc22 (diff)
downloadtalos-obmc-uboot-3d1957f0ea0133ec06f9c6fd85dc1acdf66ad29c.tar.gz
talos-obmc-uboot-3d1957f0ea0133ec06f9c6fd85dc1acdf66ad29c.zip
dm: i2c: Add support for multiplexed I2C buses
Add a new I2C_MUX uclass. Devices in this class can multiplex between several I2C buses, selecting them one at a time for use by the system. The multiplexing mechanism is left to the driver to decide - it may be controlled by GPIOs, for example. The uclass supports only two methods: select() and deselect(). The current mux state is expected to be stored in the mux itself since it is the only thing that knows how to make things work. The mux can record the current state and then avoid switching unless it is necessary. So select() can be skipped if the mux is already in the correct state. Also deselect() can be made a nop if required. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/uclass-id.h')
-rw-r--r--include/dm/uclass-id.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
index bc057d7adf..777b101842 100644
--- a/include/dm/uclass-id.h
+++ b/include/dm/uclass-id.h
@@ -35,6 +35,7 @@ enum uclass_id {
UCLASS_I2C, /* I2C bus */
UCLASS_I2C_EEPROM, /* I2C EEPROM device */
UCLASS_I2C_GENERIC, /* Generic I2C device */
+ UCLASS_I2C_MUX, /* I2C multiplexer */
UCLASS_LED, /* Light-emitting diode (LED) */
UCLASS_LPC, /* x86 'low pin count' interface */
UCLASS_MASS_STORAGE, /* Mass storage device */
OpenPOWER on IntegriCloud