diff options
Diffstat (limited to 'include/linux/i2c-mux.h')
-rw-r--r-- | include/linux/i2c-mux.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/i2c-mux.h b/include/linux/i2c-mux.h index 2fa93fe1345e..d4c1d12f900d 100644 --- a/include/linux/i2c-mux.h +++ b/include/linux/i2c-mux.h @@ -27,9 +27,12 @@ #ifdef __KERNEL__ +#include <linux/bitops.h> + struct i2c_mux_core { struct i2c_adapter *parent; struct device *dev; + bool mux_locked; void *priv; @@ -47,11 +50,16 @@ struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, int (*select)(struct i2c_mux_core *, u32), int (*deselect)(struct i2c_mux_core *, u32)); +/* flags for i2c_mux_alloc */ +#define I2C_MUX_LOCKED BIT(0) + static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) { return muxc->priv; } +struct i2c_adapter *i2c_root_adapter(struct device *dev); + /* * Called to create an i2c bus on a multiplexed bus segment. * The chan_id parameter is passed to the select and deselect |