summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch
new file mode 100644
index 00000000..808d2c3f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0076-hwmon-jc42-Add-support-for-ST-Microelectronics-STTS2.patch
@@ -0,0 +1,89 @@
1From 5c986387e4a96e195dc0e7517e9e5dacb12e29b8 Mon Sep 17 00:00:00 2001
2From: Jean Delvare <khali@linux-fr.org>
3Date: Mon, 5 Mar 2012 08:32:00 -0500
4Subject: [PATCH 76/95] hwmon: (jc42) Add support for ST Microelectronics
5 STTS2002 and STTS3000
6
7commit 4de86126a712ba83fa038d277c8282f7ed466a4b upstream.
8
9These are fully compatible with Jedec JC 42.4 as far as I can see.
10
11Signed-off-by: Jean Delvare <khali@linux-fr.org>
12Cc: Guenter Roeck <guenter.roeck@ericsson.com>
13Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15---
16 Documentation/hwmon/jc42 | 6 ++++++
17 drivers/hwmon/Kconfig | 3 ++-
18 drivers/hwmon/jc42.c | 10 ++++++++++
19 3 files changed, 18 insertions(+), 1 deletion(-)
20
21diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
22index a22ecf4..e713375 100644
23--- a/Documentation/hwmon/jc42
24+++ b/Documentation/hwmon/jc42
25@@ -48,6 +48,12 @@ Supported chips:
26 Datasheets:
27 http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf
28 http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf
29+ * ST Microelectronics STTS2002, STTS3000
30+ Prefix: 'stts2002', 'stts3000'
31+ Addresses scanned: I2C 0x18 - 0x1f
32+ Datasheets:
33+ http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf
34+ http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf
35 * JEDEC JC 42.4 compliant temperature sensor chips
36 Prefix: 'jc42'
37 Addresses scanned: I2C 0x18 - 0x1f
38diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
39index 91be41f..629833a 100644
40--- a/drivers/hwmon/Kconfig
41+++ b/drivers/hwmon/Kconfig
42@@ -498,7 +498,8 @@ config SENSORS_JC42
43 temperature sensors, which are used on many DDR3 memory modules for
44 mobile devices and servers. Support will include, but not be limited
45 to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243,
46- MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3.
47+ MCP9843, SE97, SE98, STTS424(E), STTS2002, STTS3000, TSE2002B3, and
48+ TS3000B3.
49
50 This driver can also be built as a module. If so, the module
51 will be called jc42.
52diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
53index 2d3d728..4cbd4c7 100644
54--- a/drivers/hwmon/jc42.c
55+++ b/drivers/hwmon/jc42.c
56@@ -113,6 +113,12 @@ static const unsigned short normal_i2c[] = {
57 #define STTS424E_DEVID 0x0000
58 #define STTS424E_DEVID_MASK 0xfffe
59
60+#define STTS2002_DEVID 0x0300
61+#define STTS2002_DEVID_MASK 0xffff
62+
63+#define STTS3000_DEVID 0x0200
64+#define STTS3000_DEVID_MASK 0xffff
65+
66 static u16 jc42_hysteresis[] = { 0, 1500, 3000, 6000 };
67
68 struct jc42_chips {
69@@ -133,6 +139,8 @@ static struct jc42_chips jc42_chips[] = {
70 { NXP_MANID, SE98_DEVID, SE98_DEVID_MASK },
71 { STM_MANID, STTS424_DEVID, STTS424_DEVID_MASK },
72 { STM_MANID, STTS424E_DEVID, STTS424E_DEVID_MASK },
73+ { STM_MANID, STTS2002_DEVID, STTS2002_DEVID_MASK },
74+ { STM_MANID, STTS3000_DEVID, STTS3000_DEVID_MASK },
75 };
76
77 /* Each client has this additional data */
78@@ -171,6 +179,8 @@ static const struct i2c_device_id jc42_id[] = {
79 { "se97b", 0 },
80 { "se98", 0 },
81 { "stts424", 0 },
82+ { "stts2002", 0 },
83+ { "stts3000", 0 },
84 { "tse2002b3", 0 },
85 { "ts3000b3", 0 },
86 { }
87--
881.7.9.4
89