|
| 1 | +From 291cfd2e11a31164aaf9eeff38447fc553c74dbd Mon Sep 17 00:00:00 2001 |
| 2 | +From: Natarajan Subbiramani < [email protected]> |
| 3 | +Date: Mon, 20 Mar 2023 18:22:33 +0000 |
| 4 | +Subject: [PATCH] Adding EMC2302 support |
| 5 | + |
| 6 | +Existing code supports only 2305 and this patch enables the driver to |
| 7 | +support 2302 model as well. |
| 8 | + |
| 9 | +--- |
| 10 | + drivers/hwmon/emc2305.c | 5 ----- |
| 11 | + 1 file changed, 5 deletions(-) |
| 12 | + |
| 13 | +diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c |
| 14 | +index e0b7392..3347a08 100644 |
| 15 | +--- a/drivers/hwmon/emc2305.c |
| 16 | ++++ b/drivers/hwmon/emc2305.c |
| 17 | +@@ -18,7 +18,6 @@ static const unsigned short |
| 18 | + emc2305_normal_i2c[] = { 0x27, 0x2c, 0x2d, 0x2e, 0x2f, 0x4c, 0x4d, I2C_CLIENT_END }; |
| 19 | + |
| 20 | + #define EMC2305_REG_DRIVE_FAIL_STATUS 0x27 |
| 21 | +-#define EMC2305_REG_DEVICE 0xfd |
| 22 | + #define EMC2305_REG_VENDOR 0xfe |
| 23 | + #define EMC2305_FAN_MAX_NUM 5 |
| 24 | + #define EMC2305_FAN_MAX 0xff /*100%*/ |
| 25 | +@@ -443,10 +442,6 @@ static int emc2305_probe(struct i2c_client *client, const struct i2c_device_id * |
| 26 | + if (vendor != EMC2305_VENDOR) |
| 27 | + return -ENODEV; |
| 28 | + |
| 29 | +- device = i2c_smbus_read_byte_data(client, EMC2305_REG_DEVICE); |
| 30 | +- if (device != EMC2305_DEVICE) |
| 31 | +- return -ENODEV; |
| 32 | +- |
| 33 | + max_state = EMC2305_FAN_MAX_STATE; |
| 34 | + max_pwm = EMC2305_FAN_MAX; |
| 35 | + min_pwm = EMC2305_FAN_MIN; |
| 36 | +-- |
| 37 | +2.25.1 |
| 38 | + |
0 commit comments