aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/i2c/busses/i2c-designware-core.h
diff options
context:
space:
mode:
authorWeifeng Voon <weifeng.voon@intel.com>2016-08-12 17:02:47 +0300
committerWolfram Sang <wsa@the-dreams.de>2016-08-26 00:42:02 +0200
commit19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae (patch)
treefc6d17a11ee86fc45a6c94c72b67a966fdc30748 /drivers/i2c/busses/i2c-designware-core.h
parenti2c: octeon: thunderx: Add MAINTAINERS entry (diff)
downloadwireguard-linux-19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae.tar.xz
wireguard-linux-19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae.zip
i2c: designware: Move clk_freq into struct dw_i2c_dev
I2c designware controller operate speed is configured in the register IC_CON. Previously the operate speed is determined by a local variable clk_freq. This patch will move the local variable clk_freq into struct dw_i2c_dev. This change will ease the set and get of the clk_freq. Signed-off-by: Weifeng Voon <weifeng.voon@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@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 38493a7142ad..63f6d4acee39 100644
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -57,6 +57,7 @@
* @tx_fifo_depth: depth of the hardware tx fifo
* @rx_fifo_depth: depth of the hardware rx fifo
* @rx_outstanding: current master-rx elements in tx fifo
+ * @clk_freq: bus clock frequency
* @ss_hcnt: standard speed HCNT value
* @ss_lcnt: standard speed LCNT value
* @fs_hcnt: fast speed HCNT value
@@ -96,6 +97,7 @@ struct dw_i2c_dev {
unsigned int tx_fifo_depth;
unsigned int rx_fifo_depth;
int rx_outstanding;
+ u32 clk_freq;
u32 sda_hold_time;
u32 sda_falling_time;
u32 scl_falling_time;