All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (lm92) Remove spurious test that prevented max6335 detection
@ 2018-03-21  9:22 Alvaro Gamez Machado
  0 siblings, 0 replies; only message in thread
From: Alvaro Gamez Machado @ 2018-03-21  9:22 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, linux-hwmon; +Cc: Alvaro Gamez Machado

An assumption was made that reads of a max6335 LM92_REG_MAN_ID register
would return the last value read from any other of its register.

This assumption is not only something that is not documented anywhere,
but it is also untrue, so this prevented max6335 recognition.

Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
---
 drivers/hwmon/lm92.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c
index 2a91974a10bb..a2c3f3080192 100644
--- a/drivers/hwmon/lm92.c
+++ b/drivers/hwmon/lm92.c
@@ -272,16 +272,8 @@ static int max6635_check(struct i2c_client *client)
 	u8 conf;
 	int i;
 
-	/*
-	 * No manufacturer ID register, so a read from this address will
-	 * always return the last read value.
-	 */
 	temp_low = i2c_smbus_read_word_data(client, LM92_REG_TEMP_LOW);
-	if (i2c_smbus_read_word_data(client, LM92_REG_MAN_ID) != temp_low)
-		return 0;
 	temp_high = i2c_smbus_read_word_data(client, LM92_REG_TEMP_HIGH);
-	if (i2c_smbus_read_word_data(client, LM92_REG_MAN_ID) != temp_high)
-		return 0;
 
 	/* Limits are stored as integer values (signed, 9-bit). */
 	if ((temp_low & 0x7f00) || (temp_high & 0x7f00))
-- 
2.16.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-21  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21  9:22 [PATCH] hwmon: (lm92) Remove spurious test that prevented max6335 detection Alvaro Gamez Machado

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.