Skip to content

Commit f5fea3d

Browse files
committed
[patch]Add hwmon support for EMC2302
The current code only supports emc2305, enable support for emc2302 also.
1 parent 6847319 commit f5fea3d

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+

patch/series

+3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ cisco-Enable-static-memory-reservation-for-OIRable-PCIe-de.patch
180180
cisco-npu-disable-other-bars.patch
181181
cisco-hwmon-pmbus_core-pec-support-check.patch
182182

183+
#Nokia patches for 5.10 kernel
184+
0001-hwmon-supporting-emc2302.patch
185+
183186
# sFlow + dropmon support
184187
0001-psample-Encapsulate-packet-metadata-in-a-struct.patch
185188
0002-psample-Add-additional-metadata-attributes.patch

0 commit comments

Comments
 (0)