History

hwmon: (ntc_thermistor) Add support for ncpXXwf104

This patch adds support for the ntc thermistor NCPXXWF104 series.

Beomho Seo committed 11 years ago

Commit 887ee431 parent c65b99f5 files · +52 −4Browse files

Unified · Split

5 files
  1. Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt +1 −0
  2. Documentation/hwmon/ntc_thermistor +4 −2
  3. drivers/hwmon/Kconfig +2 −2
  4. drivers/hwmon/ntc_thermistor.c +44 −0
  5. include/linux/platform_data/ntc_thermistor.h +1 −0
Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt+1−0
@@ -9,6 +9,7 @@ Requires node properties: · 8 unmodified lines
99 "murata,ncp21wb473"
1010 "murata,ncp03wb473"
1111 "murata,ncp15wl333"
12+ "murata,ncp03wf104"
1213
1314 /* Usage of vendor name "ntc" is deprecated */
1415 <DEPRECATED> "ntc,ncp15wb473"
Documentation/hwmon/ntc_thermistor+4−2
@@ -2,8 +2,10 @@ Kernel driver ntc_thermistor · 1 unmodified line
22 =================
33
44 Supported thermistors from Murata:
5−* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333
6− Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
5+* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
6+ NCP15WL333, NCP03WF104
7+ Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
8+ 'ncp15wl333', 'ncp03wf104'
79 Datasheet: Publicly available at Murata
810
911 Supported thermistors from EPCOS:
drivers/hwmon/Kconfig+2−2
@@ -1106,8 +1106,8 @@ config SENSORS_NTC_THERMISTOR · 1105 unmodified lines
11061106 send notifications about the temperature.
11071107
11081108 Currently, this driver supports
1109− NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
1110− from Murata and B57330V2103 from EPCOS.
1109+ NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333,
1110+ and NCP03WF104 from Murata and B57330V2103 from EPCOS.
11111111
11121112 This driver can also be built as a module. If so, the module
11131113 will be called ntc-thermistor.
drivers/hwmon/ntc_thermistor.c+44−0
@@ -53,6 +53,7 @@ static const struct platform_device_id ntc_thermistor_id[] = { · 52 unmodified lines
5353 { "ncp03wb473", TYPE_NCPXXWB473 },
5454 { "ncp15wl333", TYPE_NCPXXWL333 },
5555 { "b57330v2103", TYPE_B57330V2103},
56+ { "ncp03wf104", TYPE_NCPXXWF104 },
5657 { },
5758 };
5859
@@ -135,6 +136,43 @@ static const struct ntc_compensation ncpXXwl333[] = { · 76 unmodified lines
135136 { .temp_c = 125, .ohm = 707 },
136137 };
137138
139+static const struct ntc_compensation ncpXXwf104[] = {
140+ { .temp_c = -40, .ohm = 4397119 },
141+ { .temp_c = -35, .ohm = 3088599 },
142+ { .temp_c = -30, .ohm = 2197225 },
143+ { .temp_c = -25, .ohm = 1581881 },
144+ { .temp_c = -20, .ohm = 1151037 },
145+ { .temp_c = -15, .ohm = 846579 },
146+ { .temp_c = -10, .ohm = 628988 },
147+ { .temp_c = -5, .ohm = 471632 },
148+ { .temp_c = 0, .ohm = 357012 },
149+ { .temp_c = 5, .ohm = 272500 },
150+ { .temp_c = 10, .ohm = 209710 },
151+ { .temp_c = 15, .ohm = 162651 },
152+ { .temp_c = 20, .ohm = 127080 },
153+ { .temp_c = 25, .ohm = 100000 },
154+ { .temp_c = 30, .ohm = 79222 },
155+ { .temp_c = 35, .ohm = 63167 },
156+ { .temp_c = 40, .ohm = 50677 },
157+ { .temp_c = 45, .ohm = 40904 },
158+ { .temp_c = 50, .ohm = 33195 },
159+ { .temp_c = 55, .ohm = 27091 },
160+ { .temp_c = 60, .ohm = 22224 },
161+ { .temp_c = 65, .ohm = 18323 },
162+ { .temp_c = 70, .ohm = 15184 },
163+ { .temp_c = 75, .ohm = 12635 },
164+ { .temp_c = 80, .ohm = 10566 },
165+ { .temp_c = 85, .ohm = 8873 },
166+ { .temp_c = 90, .ohm = 7481 },
167+ { .temp_c = 95, .ohm = 6337 },
168+ { .temp_c = 100, .ohm = 5384 },
169+ { .temp_c = 105, .ohm = 4594 },
170+ { .temp_c = 110, .ohm = 3934 },
171+ { .temp_c = 115, .ohm = 3380 },
172+ { .temp_c = 120, .ohm = 2916 },
173+ { .temp_c = 125, .ohm = 2522 },
174+};
175+
138176 /*
139177 * The following compensation table is from the specification of EPCOS NTC
140178 * Thermistors Datasheet
@@ -219,6 +257,8 @@ static const struct of_device_id ntc_match[] = { · 78 unmodified lines
219257 .data = &ntc_thermistor_id[4] },
220258 { .compatible = "epcos,b57330v2103",
221259 .data = &ntc_thermistor_id[5]},
260+ { .compatible = "murata,ncp03wf104",
261+ .data = &ntc_thermistor_id[6] },
222262
223263 /* Usage of vendor name "ntc" is deprecated */
224264 { .compatible = "ntc,ncp15wb473",
@@ -567,6 +607,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev) · 342 unmodified lines
567607 data->comp = b57330v2103;
568608 data->n_comp = ARRAY_SIZE(b57330v2103);
569609 break;
610+ case TYPE_NCPXXWF104:
611+ data->comp = ncpXXwf104;
612+ data->n_comp = ARRAY_SIZE(ncpXXwf104);
613+ break;
570614 default:
571615 dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
572616 pdev_id->driver_data, pdev_id->name);
include/linux/platform_data/ntc_thermistor.h+1−0
@@ -27,6 +27,7 @@ enum ntc_thermistor_type { · 26 unmodified lines
2727 TYPE_NCPXXWB473,
2828 TYPE_NCPXXWL333,
2929 TYPE_B57330V2103,
30+ TYPE_NCPXXWF104,
3031 };
3132
3233 struct ntc_thermistor_platform_data {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t