diff options
Diffstat (limited to 'drivers/hwmon/max6650.c')
| -rw-r--r-- | drivers/hwmon/max6650.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index 58f66be61b1f..1da561e0cb37 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c | |||
| @@ -534,7 +534,7 @@ static int max6650_detect(struct i2c_client *client, int kind, | |||
| 534 | struct i2c_adapter *adapter = client->adapter; | 534 | struct i2c_adapter *adapter = client->adapter; |
| 535 | int address = client->addr; | 535 | int address = client->addr; |
| 536 | 536 | ||
| 537 | dev_dbg(&adapter->dev, "max6650_detect called, kind = %d\n", kind); | 537 | dev_dbg(&adapter->dev, "max6650_detect called\n"); |
| 538 | 538 | ||
| 539 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 539 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
| 540 | dev_dbg(&adapter->dev, "max6650: I2C bus doesn't support " | 540 | dev_dbg(&adapter->dev, "max6650: I2C bus doesn't support " |
| @@ -542,23 +542,7 @@ static int max6650_detect(struct i2c_client *client, int kind, | |||
| 542 | return -ENODEV; | 542 | return -ENODEV; |
| 543 | } | 543 | } |
| 544 | 544 | ||
| 545 | /* | 545 | if (((i2c_smbus_read_byte_data(client, MAX6650_REG_CONFIG) & 0xC0) |
| 546 | * Now we do the remaining detection. A negative kind means that | ||
| 547 | * the driver was loaded with no force parameter (default), so we | ||
| 548 | * must both detect and identify the chip (actually there is only | ||
| 549 | * one possible kind of chip for now, max6650). A zero kind means that | ||
| 550 | * the driver was loaded with the force parameter, the detection | ||
| 551 | * step shall be skipped. A positive kind means that the driver | ||
| 552 | * was loaded with the force parameter and a given kind of chip is | ||
| 553 | * requested, so both the detection and the identification steps | ||
| 554 | * are skipped. | ||
| 555 | * | ||
| 556 | * Currently I can find no way to distinguish between a MAX6650 and | ||
| 557 | * a MAX6651. This driver has only been tried on the former. | ||
| 558 | */ | ||
| 559 | |||
| 560 | if ((kind < 0) && | ||
| 561 | ( (i2c_smbus_read_byte_data(client, MAX6650_REG_CONFIG) & 0xC0) | ||
| 562 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_GPIO_STAT) & 0xE0) | 546 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_GPIO_STAT) & 0xE0) |
| 563 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_ALARM_EN) & 0xE0) | 547 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_ALARM_EN) & 0xE0) |
| 564 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_ALARM) & 0xE0) | 548 | ||(i2c_smbus_read_byte_data(client, MAX6650_REG_ALARM) & 0xE0) |
