Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (ntc_thermistor) Add support for ncpXXwf104

This patch adds support for the ntc thermistor NCPXXWF104 series.

Cc: Jean Delvare <jdelvare@suse.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Beomho Seo and committed by
Guenter Roeck
887ee434 c65b99f0

+52 -4
+1
Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
··· 9 9 "murata,ncp21wb473" 10 10 "murata,ncp03wb473" 11 11 "murata,ncp15wl333" 12 + "murata,ncp03wf104" 12 13 13 14 /* Usage of vendor name "ntc" is deprecated */ 14 15 <DEPRECATED> "ntc,ncp15wb473"
+4 -2
Documentation/hwmon/ntc_thermistor
··· 2 2 ================= 3 3 4 4 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' 7 9 Datasheet: Publicly available at Murata 8 10 9 11 Supported thermistors from EPCOS:
+2 -2
drivers/hwmon/Kconfig
··· 1106 1106 send notifications about the temperature. 1107 1107 1108 1108 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. 1111 1111 1112 1112 This driver can also be built as a module. If so, the module 1113 1113 will be called ntc-thermistor.
+44
drivers/hwmon/ntc_thermistor.c
··· 53 53 { "ncp03wb473", TYPE_NCPXXWB473 }, 54 54 { "ncp15wl333", TYPE_NCPXXWL333 }, 55 55 { "b57330v2103", TYPE_B57330V2103}, 56 + { "ncp03wf104", TYPE_NCPXXWF104 }, 56 57 { }, 57 58 }; 58 59 ··· 134 133 { .temp_c = 115, .ohm = 949 }, 135 134 { .temp_c = 120, .ohm = 817 }, 136 135 { .temp_c = 125, .ohm = 707 }, 136 + }; 137 + 138 + static const struct ntc_compensation ncpXXwf104[] = { 139 + { .temp_c = -40, .ohm = 4397119 }, 140 + { .temp_c = -35, .ohm = 3088599 }, 141 + { .temp_c = -30, .ohm = 2197225 }, 142 + { .temp_c = -25, .ohm = 1581881 }, 143 + { .temp_c = -20, .ohm = 1151037 }, 144 + { .temp_c = -15, .ohm = 846579 }, 145 + { .temp_c = -10, .ohm = 628988 }, 146 + { .temp_c = -5, .ohm = 471632 }, 147 + { .temp_c = 0, .ohm = 357012 }, 148 + { .temp_c = 5, .ohm = 272500 }, 149 + { .temp_c = 10, .ohm = 209710 }, 150 + { .temp_c = 15, .ohm = 162651 }, 151 + { .temp_c = 20, .ohm = 127080 }, 152 + { .temp_c = 25, .ohm = 100000 }, 153 + { .temp_c = 30, .ohm = 79222 }, 154 + { .temp_c = 35, .ohm = 63167 }, 155 + { .temp_c = 40, .ohm = 50677 }, 156 + { .temp_c = 45, .ohm = 40904 }, 157 + { .temp_c = 50, .ohm = 33195 }, 158 + { .temp_c = 55, .ohm = 27091 }, 159 + { .temp_c = 60, .ohm = 22224 }, 160 + { .temp_c = 65, .ohm = 18323 }, 161 + { .temp_c = 70, .ohm = 15184 }, 162 + { .temp_c = 75, .ohm = 12635 }, 163 + { .temp_c = 80, .ohm = 10566 }, 164 + { .temp_c = 85, .ohm = 8873 }, 165 + { .temp_c = 90, .ohm = 7481 }, 166 + { .temp_c = 95, .ohm = 6337 }, 167 + { .temp_c = 100, .ohm = 5384 }, 168 + { .temp_c = 105, .ohm = 4594 }, 169 + { .temp_c = 110, .ohm = 3934 }, 170 + { .temp_c = 115, .ohm = 3380 }, 171 + { .temp_c = 120, .ohm = 2916 }, 172 + { .temp_c = 125, .ohm = 2522 }, 137 173 }; 138 174 139 175 /* ··· 257 219 .data = &ntc_thermistor_id[4] }, 258 220 { .compatible = "epcos,b57330v2103", 259 221 .data = &ntc_thermistor_id[5]}, 222 + { .compatible = "murata,ncp03wf104", 223 + .data = &ntc_thermistor_id[6] }, 260 224 261 225 /* Usage of vendor name "ntc" is deprecated */ 262 226 { .compatible = "ntc,ncp15wb473", ··· 606 566 case TYPE_B57330V2103: 607 567 data->comp = b57330v2103; 608 568 data->n_comp = ARRAY_SIZE(b57330v2103); 569 + break; 570 + case TYPE_NCPXXWF104: 571 + data->comp = ncpXXwf104; 572 + data->n_comp = ARRAY_SIZE(ncpXXwf104); 609 573 break; 610 574 default: 611 575 dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
+1
include/linux/platform_data/ntc_thermistor.h
··· 27 27 TYPE_NCPXXWB473, 28 28 TYPE_NCPXXWL333, 29 29 TYPE_B57330V2103, 30 + TYPE_NCPXXWF104, 30 31 }; 31 32 32 33 struct ntc_thermistor_platform_data {