diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:30 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:30 +0200 |
commit | 45d273f3a149727bbf3c2d68d8098bd9a181fb19 (patch) | |
tree | af9ca07c160f333e4191fc00c2431f68658445bb /include | |
parent | 1525736c69261b594181ff2217b28ad81eaab425 (diff) | |
parent | 2a814c11eddec16b306b29aafd37bf6e61138241 (diff) | |
download | barebox-45d273f3a149727bbf3c2d68d8098bd9a181fb19.tar.gz barebox-45d273f3a149727bbf3c2d68d8098bd9a181fb19.tar.xz |
Merge branch 'for-next/stm32'
Diffstat (limited to 'include')
-rw-r--r-- | include/i2c/i2c.h | 20 |
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) |