mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Heiko Schocher
parent
a8d2b515f9
commit
23ad52ebb1
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user