[U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Lukasz Majewski
Support for multiple soft I2C buses at soft_i2c.c This approach defines get_multi_{sda|scl}_pin functions to switch between multiple soft I2C buses. Up to CONFIG_SYS_MAX_I2C_BUS devices can be utilized. Common definition of I2C_X I2C buses is provided. TEST HW: Samsung's Exynos4210 evt.0.1

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Heiko Schocher
Hello Lukasz, On 28.08.2012 10:33, Lukasz Majewski wrote: Support for multiple soft I2C buses at soft_i2c.c This approach defines get_multi_{sda|scl}_pin functions to switch between multiple soft I2C buses. Up to CONFIG_SYS_MAX_I2C_BUS devices can be utilized. Common definition of I2C_X I2C

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Lukasz Majewski
Hi Heiko, #if defined(CONFIG_I2C_MULTI_BUS) static unsigned int i2c_bus_num __attribute__ ((section (.data))) = 0; +const char *soft_i2c_name[CONFIG_SYS_MAX_I2C_BUS] = { + NULL, + NULL, + NULL, + NULL, + soft_i2c_4, + soft_i2c_5, + NULL, +}; For what

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Heiko Schocher
Hello Lukasz, On 28.08.2012 12:40, Lukasz Majewski wrote: Hi Heiko, #if defined(CONFIG_I2C_MULTI_BUS) static unsigned int i2c_bus_num __attribute__ ((section (.data))) = 0; +const char *soft_i2c_name[CONFIG_SYS_MAX_I2C_BUS] = { + NULL, + NULL, + NULL, + NULL, +

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Lukasz Majewski
Hi Heiko, +#if defined(CONFIG_I2C_MULTI_BUS) +/* Handle multiple I2C buses instances */ +int get_multi_scl_pin(void) +{ + switch (I2C_GET_BUS()) { + case I2C_4: + return CONFIG_SOFT_I2C_I2C4_SCL; + case I2C_5: + return CONFIG_SOFT_I2C_I2C5_SCL; + }; + +

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Heiko Schocher
Hello Lukasz, On 28.08.2012 14:12, Lukasz Majewski wrote: Hi Heiko, +#if defined(CONFIG_I2C_MULTI_BUS) +/* Handle multiple I2C buses instances */ +int get_multi_scl_pin(void) +{ + switch (I2C_GET_BUS()) { + case I2C_4: + return CONFIG_SOFT_I2C_I2C4_SCL; + case

Re: [U-Boot] [PATCH 1/2] i2c:soft:multi: Support for multiple soft I2C buses

2012-08-28 Thread Lukasz Majewski
Hi Heiko, Hello Lukasz, On 28.08.2012 14:12, Lukasz Majewski wrote: Hi Heiko, +#if defined(CONFIG_I2C_MULTI_BUS) +/* Handle multiple I2C buses instances */ +int get_multi_scl_pin(void) +{ + switch (I2C_GET_BUS()) { + case I2C_4: + return