Skip to contentSkip to conversation

ppc4xx: Allow DTT_I2C_DEV_CODE configured by CFG_I2C_DTT_ADDR

PATCH Superseded Victor Gallardo 2 participants 2 messages Sep 9, 2008 Hardware monitoring

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Allow DTT_I2C_DEV_CODE configured by CFG_I2C_DTT_ADDR

On AMCC Arches board DTT_I2C_DEV_CODE is different then canyonlands and glacier.

This patch allows DTT_I2C_DEV_CODE to be configured by CFG_I2C_DTT_ADDR

---
 drivers/hwmon/lm75.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/hwmon/lm75.c +4 -0
index 8051cb2..67a18f6 100644
@@ -38,7 +38,11 @@
 /*
  * Device code
  */
+#if defined(CFG_I2C_DTT_ADDR)
+#define DTT_I2C_DEV_CODE CFG_I2C_DTT_ADDR
+#else
 #define DTT_I2C_DEV_CODE 0x48			/* ON Semi's LM75 device */
+#endif
 #define DTT_READ_TEMP		0x0
 #define DTT_CONFIG		0x1
 #define DTT_TEMP_HYST		0x2
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/1 ppc4xx: Allow DTT_I2C_DEV_CODE configured by CFG_I2C_DTT_ADDR

Dear Victor Gallardo,

Quoted 8 lines · In message <[email protected]> you wrote:

On AMCC Arches board DTT_I2C_DEV_CODE is different then canyonlands and glacier.

This patch allows DTT_I2C_DEV_CODE to be configured by CFG_I2C_DTT_ADDR

---
 drivers/hwmon/lm75.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Please also add a description of CFG_I2C_DTT_ADDR to the README. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you fail to plan, plan to fail.