diff options
author | Weifeng Voon <weifeng.voon@intel.com> | 2016-08-12 17:02:47 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-08-26 01:42:02 +0300 |
commit | 19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae (patch) | |
tree | fc6d17a11ee86fc45a6c94c72b67a966fdc30748 /drivers/i2c/busses/i2c-designware-core.h | |
parent | f9484852567987158545523d6d6325d9cdf482b1 (diff) | |
download | linux-19c0a5399fe46218c2b5a5c17a01cf60f91ff5ae.tar.xz |
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.h | 2 |
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; |