aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-designware-core.h
diff options
context:
space:
mode:
authorLuis Oliveira <Luis.Oliveira@synopsys.com>2017-06-22 11:17:33 +0100
committerWolfram Sang <wsa@the-dreams.de>2017-06-27 23:37:07 +0200
commit5b6d721b266acaef411520e28066e4624c6619e7 (patch)
tree1670ff6779af961b825447c0e417252cb158ef51 /drivers/i2c/busses/i2c-designware-core.h
parenti2c: designware: add SLAVE mode functions (diff)
downloadlinux-dev-5b6d721b266acaef411520e28066e4624c6619e7.tar.xz
linux-dev-5b6d721b266acaef411520e28066e4624c6619e7.zip
i2c: designware: enable SLAVE in platform module
- Slave mode selected in platform module if the support is detected in the DT. Signed-off-by: Luis Oliveira <lolivei@synopsys.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-core.h')
-rw-r--r--drivers/i2c/busses/i2c-designware-core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
index 64a39a983410..7bfbcc62f6c5 100644
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -228,6 +228,7 @@
* @disable: function to disable the controller
* @disable_int: function to disable all interrupts
* @init: function to initialize the I2C hardware
+ * @mode: operation mode - DW_IC_MASTER or DW_IC_SLAVE
*
* HCNT and LCNT parameters can be used if the platform knows more accurate
* values than the one computed based only on the input clock frequency.
@@ -282,6 +283,7 @@ struct dw_i2c_dev {
void (*disable)(struct dw_i2c_dev *dev);
void (*disable_int)(struct dw_i2c_dev *dev);
int (*init)(struct dw_i2c_dev *dev);
+ int mode;
};
#define ACCESS_SWAP 0x00000001