public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2] i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED
@ 2013-08-01 10:32 Marek Vasut
  2013-08-03  4:05 ` Heiko Schocher
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2013-08-01 10:32 UTC (permalink / raw)
  To: u-boot

In case only the CONFIG_SYS_I2C_SPEED is set in configuration file,
the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED.
The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver.

Unfortunatelly, due to a typo in the driver, instead of defining
CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined
and therefore the driver failed to compile. The same applies for
CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well.

This patch fixes the issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
 drivers/i2c/soft_i2c.c       |    8 ++++----
 include/configs/blackstamp.h |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

V2: Fix blackstamp board too

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index a2baec0..396fea8 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -105,11 +105,11 @@ DECLARE_GLOBAL_DATA_PTR;
 # endif
 #endif
 
-#if !defined(CONFIG_SYS_SOFT_I2C_SPEED)
-#define CONFIG_SYS_SOFT_I2C_SPEED CONFIG_SYS_I2C_SPEED
+#if !defined(CONFIG_SYS_I2C_SOFT_SPEED)
+#define CONFIG_SYS_I2C_SOFT_SPEED CONFIG_SYS_I2C_SPEED
 #endif
-#if !defined(CONFIG_SYS_SOFT_I2C_SLAVE)
-#define CONFIG_SYS_SOFT_I2C_SLAVE CONFIG_SYS_I2C_SLAVE
+#if !defined(CONFIG_SYS_I2C_SOFT_SLAVE)
+#define CONFIG_SYS_I2C_SOFT_SLAVE CONFIG_SYS_I2C_SLAVE
 #endif
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h
index 7d82275..5b3aac7 100644
--- a/include/configs/blackstamp.h
+++ b/include/configs/blackstamp.h
@@ -206,8 +206,8 @@
 #ifdef CONFIG_SYS_I2C_SOFT
 #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF9
 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF8
-#define CONFIG_SYS_SOFT_I2C_SPEED	50000
-#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_SOFT_SPEED	50000
+#define CONFIG_SYS_I2C_SOFT_SLAVE	0xFE
 #endif
 
 /*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH V2] i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED
  2013-08-01 10:32 [U-Boot] [PATCH V2] i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED Marek Vasut
@ 2013-08-03  4:05 ` Heiko Schocher
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Schocher @ 2013-08-03  4:05 UTC (permalink / raw)
  To: u-boot

Hello Marek,

Am 01.08.2013 12:32, schrieb Marek Vasut:
> In case only the CONFIG_SYS_I2C_SPEED is set in configuration file,
> the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED.
> The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver.
>
> Unfortunatelly, due to a typo in the driver, instead of defining
> CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined
> and therefore the driver failed to compile. The same applies for
> CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well.
>
> This patch fixes the issue.
>
> Signed-off-by: Marek Vasut<marex@denx.de>
> Cc: Heiko Schocher<hs@denx.de>
> ---
>   drivers/i2c/soft_i2c.c       |    8 ++++----
>   include/configs/blackstamp.h |    4 ++--
>   2 files changed, 6 insertions(+), 6 deletions(-)
>
> V2: Fix blackstamp board too

Thanks! Applied to u-boot-i2c master

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-03  4:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 10:32 [U-Boot] [PATCH V2] i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED Marek Vasut
2013-08-03  4:05 ` Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox