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
9 "murata,ncp21wb473"9 "murata,ncp21wb473"
10 "murata,ncp03wb473"10 "murata,ncp03wb473"
11 "murata,ncp15wl333"11 "murata,ncp15wl333"
12 "murata,ncp03wf104"
12 13
13/* Usage of vendor name "ntc" is deprecated */14/* Usage of vendor name "ntc" is deprecated */
14<DEPRECATED> "ntc,ncp15wb473"15<DEPRECATED> "ntc,ncp15wb473"
Documentation/hwmon/ntc_thermistor+4−2
@@ -2,8 +2,10 @@ Kernel driver ntc_thermistor · 1 unmodified line
2=================2=================
3 3
4Supported thermistors from Murata:4Supported thermistors from Murata:
5* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL3335* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'6 NCP15WL333, NCP03WF104
7 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
8 'ncp15wl333', 'ncp03wf104'
7 Datasheet: Publicly available at Murata9 Datasheet: Publicly available at Murata
8 10
9Supported thermistors from EPCOS:11Supported thermistors from EPCOS:
drivers/hwmon/Kconfig+2−2
@@ -1106,8 +1106,8 @@ config SENSORS_NTC_THERMISTOR · 1105 unmodified lines
1106 send notifications about the temperature.1106 send notifications about the temperature.
1107 1107
1108 Currently, this driver supports1108 Currently, this driver supports
1109 NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL3331109 NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333,
1110 from Murata and B57330V2103 from EPCOS.1110 and NCP03WF104 from Murata and B57330V2103 from EPCOS.
1111 1111
1112 This driver can also be built as a module. If so, the module1112 This driver can also be built as a module. If so, the module
1113 will be called ntc-thermistor.1113 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
53 { "ncp03wb473", TYPE_NCPXXWB473 },53 { "ncp03wb473", TYPE_NCPXXWB473 },
54 { "ncp15wl333", TYPE_NCPXXWL333 },54 { "ncp15wl333", TYPE_NCPXXWL333 },
55 { "b57330v2103", TYPE_B57330V2103},55 { "b57330v2103", TYPE_B57330V2103},
56 { "ncp03wf104", TYPE_NCPXXWF104 },
56 { },57 { },
57};58};
58 59
@@ -135,6 +136,43 @@ static const struct ntc_compensation ncpXXwl333[] = { · 76 unmodified lines
135 { .temp_c = 125, .ohm = 707 },136 { .temp_c = 125, .ohm = 707 },
136};137};
137 138
139static 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
138/*176/*
139 * The following compensation table is from the specification of EPCOS NTC177 * The following compensation table is from the specification of EPCOS NTC
140 * Thermistors Datasheet178 * Thermistors Datasheet
@@ -219,6 +257,8 @@ static const struct of_device_id ntc_match[] = { · 78 unmodified lines
219 .data = &ntc_thermistor_id[4] },257 .data = &ntc_thermistor_id[4] },
220 { .compatible = "epcos,b57330v2103",258 { .compatible = "epcos,b57330v2103",
221 .data = &ntc_thermistor_id[5]},259 .data = &ntc_thermistor_id[5]},
260 { .compatible = "murata,ncp03wf104",
261 .data = &ntc_thermistor_id[6] },
222 262
223 /* Usage of vendor name "ntc" is deprecated */263 /* Usage of vendor name "ntc" is deprecated */
224 { .compatible = "ntc,ncp15wb473",264 { .compatible = "ntc,ncp15wb473",
@@ -567,6 +607,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev) · 342 unmodified lines
567 data->comp = b57330v2103;607 data->comp = b57330v2103;
568 data->n_comp = ARRAY_SIZE(b57330v2103);608 data->n_comp = ARRAY_SIZE(b57330v2103);
569 break;609 break;
610 case TYPE_NCPXXWF104:
611 data->comp = ncpXXwf104;
612 data->n_comp = ARRAY_SIZE(ncpXXwf104);
613 break;
570 default:614 default:
571 dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",615 dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
572 pdev_id->driver_data, pdev_id->name);616 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
27 TYPE_NCPXXWB473,27 TYPE_NCPXXWB473,
28 TYPE_NCPXXWL333,28 TYPE_NCPXXWL333,
29 TYPE_B57330V2103,29 TYPE_B57330V2103,
30 TYPE_NCPXXWF104,
30};31};
31 32
32struct ntc_thermistor_platform_data {33struct 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