drivers: i2c: rename I2C_CLOCK_SPEED Kconfig option
I2C_CLOCK_SPEED Kconfig option is DW driver specific. It does not define I2C interface speed but rather the I2C DW module clock speed. It is confusing for a user of any other I2C driver than DW. This patch renames this option to I2C_DW_CLOCK_SPEED and makes it visible only for DW I2C driver. Change-Id: I97f57332fd5cca644eabdef0968a0b2174b885ff Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
d17a053605
commit
f33b277e6f
6 changed files with 20 additions and 20 deletions
|
@ -123,14 +123,14 @@ endif # GPIO
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
|
||||||
config I2C_CLOCK_SPEED
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config I2C_DW
|
config I2C_DW
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
if I2C_DW
|
if I2C_DW
|
||||||
|
|
||||||
|
config I2C_DW_CLOCK_SPEED
|
||||||
|
default 100
|
||||||
|
|
||||||
config I2C_0
|
config I2C_0
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
|
|
@ -123,14 +123,14 @@ endif # GPIO
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
|
||||||
config I2C_CLOCK_SPEED
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config I2C_DW
|
config I2C_DW
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
if I2C_DW
|
if I2C_DW
|
||||||
|
|
||||||
|
config I2C_DW_CLOCK_SPEED
|
||||||
|
default 100
|
||||||
|
|
||||||
config I2C_0
|
config I2C_0
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
|
|
@ -121,14 +121,14 @@ endif # GPIO
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
|
||||||
config I2C_CLOCK_SPEED
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config I2C_DW
|
config I2C_DW
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
if I2C_DW
|
if I2C_DW
|
||||||
|
|
||||||
|
config I2C_DW_CLOCK_SPEED
|
||||||
|
default 100
|
||||||
|
|
||||||
config I2C_0
|
config I2C_0
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
|
|
@ -63,14 +63,14 @@ endif # PCI_LEGACY_BRIDGE
|
||||||
|
|
||||||
if I2C
|
if I2C
|
||||||
|
|
||||||
config I2C_CLOCK_SPEED
|
|
||||||
default 25
|
|
||||||
|
|
||||||
config I2C_DW
|
config I2C_DW
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
if I2C_DW
|
if I2C_DW
|
||||||
|
|
||||||
|
config I2C_DW_CLOCK_SPEED
|
||||||
|
default 25
|
||||||
|
|
||||||
config I2C_0
|
config I2C_0
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
|
|
|
@ -105,10 +105,10 @@ config I2C_INIT_PRIORITY
|
||||||
help
|
help
|
||||||
I2C device driver initialization priority.
|
I2C device driver initialization priority.
|
||||||
|
|
||||||
config I2C_CLOCK_SPEED
|
config I2C_DW_CLOCK_SPEED
|
||||||
int "Set the clock speed for I2C"
|
int "Set the clock speed for I2C"
|
||||||
default 32
|
default 32
|
||||||
depends on I2C
|
depends on I2C && I2C_DW
|
||||||
|
|
||||||
config SYS_LOG_I2C_LEVEL
|
config SYS_LOG_I2C_LEVEL
|
||||||
int
|
int
|
||||||
|
|
|
@ -58,12 +58,12 @@ typedef void (*i2c_isr_cb_t)(struct device *port);
|
||||||
|
|
||||||
/* IC_CON Low count and high count default values */
|
/* IC_CON Low count and high count default values */
|
||||||
/* TODO verify values for high and fast speed */
|
/* TODO verify values for high and fast speed */
|
||||||
#define I2C_STD_HCNT (CONFIG_I2C_CLOCK_SPEED * 4)
|
#define I2C_STD_HCNT (CONFIG_I2C_DW_CLOCK_SPEED * 4)
|
||||||
#define I2C_STD_LCNT (CONFIG_I2C_CLOCK_SPEED * 5)
|
#define I2C_STD_LCNT (CONFIG_I2C_DW_CLOCK_SPEED * 5)
|
||||||
#define I2C_FS_HCNT ((CONFIG_I2C_CLOCK_SPEED * 6) / 8)
|
#define I2C_FS_HCNT ((CONFIG_I2C_DW_CLOCK_SPEED * 6) / 8)
|
||||||
#define I2C_FS_LCNT ((CONFIG_I2C_CLOCK_SPEED * 7) / 8)
|
#define I2C_FS_LCNT ((CONFIG_I2C_DW_CLOCK_SPEED * 7) / 8)
|
||||||
#define I2C_HS_HCNT ((CONFIG_I2C_CLOCK_SPEED * 6) / 8)
|
#define I2C_HS_HCNT ((CONFIG_I2C_DW_CLOCK_SPEED * 6) / 8)
|
||||||
#define I2C_HS_LCNT ((CONFIG_I2C_CLOCK_SPEED * 7) / 8)
|
#define I2C_HS_LCNT ((CONFIG_I2C_DW_CLOCK_SPEED * 7) / 8)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DesignWare speed values don't directly translate from the Zephyr speed
|
* DesignWare speed values don't directly translate from the Zephyr speed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue