summaryrefslogtreecommitdiffstats
path: root/include/i2c/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/i2c/i2c.h')
-rw-r--r--include/i2c/i2c.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index 17b507ca22..a694e4ab2f 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -239,6 +239,24 @@ struct i2c_board_info {
};
/**
+ * struct i2c_timings - I2C timing information
+ * @bus_freq_hz: the bus frequency in Hz
+ * @scl_rise_ns: time SCL signal takes to rise in ns; t(r) in the I2C specification
+ * @scl_fall_ns: time SCL signal takes to fall in ns; t(f) in the I2C specification
+ * @scl_int_delay_ns: time IP core additionally needs to setup SCL in ns
+ * @sda_fall_ns: time SDA signal takes to fall in ns; t(f) in the I2C specification
+ * @sda_hold_ns: time IP core additionally needs to hold SDA in ns
+ */
+struct i2c_timings {
+ u32 bus_freq_hz;
+ u32 scl_rise_ns;
+ u32 scl_fall_ns;
+ u32 scl_int_delay_ns;
+ u32 sda_fall_ns;
+ u32 sda_hold_ns;
+};
+
+/**
* I2C_BOARD_INFO - macro used to list an i2c device and its address
* @dev_type: identifies the device type
* @dev_addr: the device's address on the bus.
@@ -264,6 +282,8 @@ extern int i2c_add_numbered_adapter(struct i2c_adapter *adapter);
struct i2c_adapter *i2c_get_adapter(int busnum);
struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node *node);
+void i2c_parse_fw_timings(struct device_d *dev, struct i2c_timings *t, bool use_defaults);
+
extern struct list_head i2c_adapter_list;
#define for_each_i2c_adapter(adap) \
list_for_each_entry(adap, &i2c_adapter_list, list)