global: Migrate CONFIG_SYS_I2C_DIRECT_BUS to CFG

Perform a simple rename of CONFIG_SYS_I2C_DIRECT_BUS to CFG_SYS_I2C_DIRECT_BUS

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2022-12-04 10:13:57 -05:00
parent e02e5e5188
commit d8964b3e1d
4 changed files with 13 additions and 13 deletions

4
README
View File

@ -843,7 +843,7 @@ The following options need to be configured:
CFG_SYS_NUM_I2C_BUSES
Hold the number of i2c buses you want to use.
CONFIG_SYS_I2C_DIRECT_BUS
CFG_SYS_I2C_DIRECT_BUS
define this, if you don't use i2c muxes on your hardware.
if CFG_SYS_I2C_MAX_HOPS is not defined or == 0 you can
omit this define.
@ -855,7 +855,7 @@ The following options need to be configured:
CFG_SYS_I2C_BUSES
hold a list of buses you want to use, only used if
CONFIG_SYS_I2C_DIRECT_BUS is not defined, for example
CFG_SYS_I2C_DIRECT_BUS is not defined, for example
a board with CFG_SYS_I2C_MAX_HOPS = 1 and
CFG_SYS_NUM_I2C_BUSES = 9:

View File

@ -1699,7 +1699,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
for (i = 0; i < CFG_SYS_NUM_I2C_BUSES; i++) {
printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
int j;
for (j = 0; j < CFG_SYS_I2C_MAX_HOPS; j++) {
@ -1735,7 +1735,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
return -1;
}
printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
int j;
for (j = 0; j < CFG_SYS_I2C_MAX_HOPS; j++) {
if (i2c_bus[i].next_hop[j].chip == 0)

View File

@ -33,14 +33,14 @@ struct i2c_adapter *i2c_get_adapter(int index)
return i2c_adap_p;
}
#if !defined(CONFIG_SYS_I2C_DIRECT_BUS)
#if !defined(CFG_SYS_I2C_DIRECT_BUS)
struct i2c_bus_hose i2c_bus[CFG_SYS_NUM_I2C_BUSES] =
CFG_SYS_I2C_BUSES;
#endif
DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
/*
* i2c_mux_set()
* -------------
@ -237,7 +237,7 @@ int i2c_set_bus_num(unsigned int bus)
if ((bus == I2C_BUS) && (I2C_ADAP->init_done > 0))
return 0;
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
if (bus >= CFG_SYS_NUM_I2C_BUSES)
return -1;
#endif
@ -249,7 +249,7 @@ int i2c_set_bus_num(unsigned int bus)
return -2;
}
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
i2c_mux_disconnect_all();
#endif
@ -257,7 +257,7 @@ int i2c_set_bus_num(unsigned int bus)
if (I2C_ADAP->init_done == 0)
i2c_init_bus(bus, I2C_ADAP->speed, I2C_ADAP->slaveaddr);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
i2c_mux_set_all();
#endif
return 0;

View File

@ -635,12 +635,12 @@ void i2c_early_init_f(void);
#if !defined(CFG_SYS_I2C_MAX_HOPS)
/* no muxes used bus = i2c adapters */
#define CONFIG_SYS_I2C_DIRECT_BUS 1
#define CFG_SYS_I2C_DIRECT_BUS 1
#define CFG_SYS_I2C_MAX_HOPS 0
#define CFG_SYS_NUM_I2C_BUSES ll_entry_count(struct i2c_adapter, i2c)
#else
/* we use i2c muxes */
#undef CONFIG_SYS_I2C_DIRECT_BUS
#undef CFG_SYS_I2C_DIRECT_BUS
#endif
/* define the I2C bus number for RTC and DTT if not already done */
@ -691,7 +691,7 @@ struct i2c_adapter {
struct i2c_adapter *i2c_get_adapter(int index);
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
struct i2c_mux {
int id;
char name[16];
@ -720,7 +720,7 @@ extern struct i2c_bus_hose i2c_bus[];
#define I2C_ADAP I2C_ADAP_NR(gd->cur_i2c_bus)
#define I2C_ADAP_HWNR (I2C_ADAP->hwadapnr)
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
#ifndef CFG_SYS_I2C_DIRECT_BUS
#define I2C_MUX_PCA9540_ID 1
#define I2C_MUX_PCA9540 {I2C_MUX_PCA9540_ID, "PCA9540B"}
#define I2C_MUX_PCA9542_ID 2