summaryrefslogtreecommitdiff
path: root/drivers/i2c/designware_i2c.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-23 21:48:25 +0300
committerHeiko Schocher <hs@denx.de>2020-01-27 09:24:44 +0300
commit23ad52ebb1e5b322e22c5c6b9d1a06b36fdc97c0 (patch)
treeb85035e58694d57baa9ad2859c60c0ce3087e9c2 /drivers/i2c/designware_i2c.h
parenta8d2b515f98298dc1e30d7e3ae148eeca49a97b2 (diff)
downloadu-boot-23ad52ebb1e5b322e22c5c6b9d1a06b36fdc97c0.tar.xz
i2c: designware_i2c: Separate out the speed calculation
We want to be able to calculate the speed separately from actually setting the speed, so we can generate the required ACPI tables. Split out the calculation into its own function. Drop the double underscore on __dw_i2c_set_bus_speed while we are here. That is reserved for compiler internals. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c/designware_i2c.h')
-rw-r--r--drivers/i2c/designware_i2c.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h
index 2027a91add..61a882cb65 100644
--- a/drivers/i2c/designware_i2c.h
+++ b/drivers/i2c/designware_i2c.h
@@ -8,6 +8,7 @@
#define __DW_I2C_H_
#include <clk.h>
+#include <i2c.h>
#include <reset.h>
struct i2c_regs {
@@ -165,12 +166,14 @@ struct dw_scl_sda_cfg {
* @scl_lcnt: Low count value for SCL
* @scl_hcnt: High count value for SCL
* @sda_hold: Data hold count
+ * @speed_mode: Speed mode being used
*/
struct dw_i2c_speed_config {
/* SCL high and low period count */
u16 scl_lcnt;
u16 scl_hcnt;
u32 sda_hold;
+ enum i2c_speed_mode speed_mode;
};
/**