mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
hwmon: (ntc_thermistor) Add support for ncpXXxh103
This patch adds support for the Murata NCP15XH103 thermistor series. Signed-off-by: Joseph McNally <jmcna06@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
92417dad64
commit
54ce3a0d80
@ -10,6 +10,7 @@ Requires node properties:
|
|||||||
"murata,ncp03wb473"
|
"murata,ncp03wb473"
|
||||||
"murata,ncp15wl333"
|
"murata,ncp15wl333"
|
||||||
"murata,ncp03wf104"
|
"murata,ncp03wf104"
|
||||||
|
"murata,ncp15xh103"
|
||||||
|
|
||||||
/* Usage of vendor name "ntc" is deprecated */
|
/* Usage of vendor name "ntc" is deprecated */
|
||||||
<DEPRECATED> "ntc,ncp15wb473"
|
<DEPRECATED> "ntc,ncp15wb473"
|
||||||
|
@ -3,9 +3,9 @@ Kernel driver ntc_thermistor
|
|||||||
|
|
||||||
Supported thermistors from Murata:
|
Supported thermistors from Murata:
|
||||||
* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
|
* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
|
||||||
NCP15WL333, NCP03WF104
|
NCP15WL333, NCP03WF104, NCP15XH103
|
||||||
Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
|
Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
|
||||||
'ncp15wl333', 'ncp03wf104'
|
'ncp15wl333', 'ncp03wf104', 'ncp15xh103'
|
||||||
Datasheet: Publicly available at Murata
|
Datasheet: Publicly available at Murata
|
||||||
|
|
||||||
Supported thermistors from EPCOS:
|
Supported thermistors from EPCOS:
|
||||||
|
@ -1141,7 +1141,7 @@ config SENSORS_NTC_THERMISTOR
|
|||||||
|
|
||||||
Currently, this driver supports
|
Currently, this driver supports
|
||||||
NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333,
|
NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333,
|
||||||
and NCP03WF104 from Murata and B57330V2103 from EPCOS.
|
NCP03WF104 and NCP15XH103 from Murata and B57330V2103 from EPCOS.
|
||||||
|
|
||||||
This driver can also be built as a module. If so, the module
|
This driver can also be built as a module. If so, the module
|
||||||
will be called ntc-thermistor.
|
will be called ntc-thermistor.
|
||||||
|
@ -54,6 +54,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
|
|||||||
{ "ncp15wl333", TYPE_NCPXXWL333 },
|
{ "ncp15wl333", TYPE_NCPXXWL333 },
|
||||||
{ "b57330v2103", TYPE_B57330V2103},
|
{ "b57330v2103", TYPE_B57330V2103},
|
||||||
{ "ncp03wf104", TYPE_NCPXXWF104 },
|
{ "ncp03wf104", TYPE_NCPXXWF104 },
|
||||||
|
{ "ncp15xh103", TYPE_NCPXXXH103 },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -173,6 +174,43 @@ static const struct ntc_compensation ncpXXwf104[] = {
|
|||||||
{ .temp_c = 125, .ohm = 2522 },
|
{ .temp_c = 125, .ohm = 2522 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct ntc_compensation ncpXXxh103[] = {
|
||||||
|
{ .temp_c = -40, .ohm = 247565 },
|
||||||
|
{ .temp_c = -35, .ohm = 181742 },
|
||||||
|
{ .temp_c = -30, .ohm = 135128 },
|
||||||
|
{ .temp_c = -25, .ohm = 101678 },
|
||||||
|
{ .temp_c = -20, .ohm = 77373 },
|
||||||
|
{ .temp_c = -15, .ohm = 59504 },
|
||||||
|
{ .temp_c = -10, .ohm = 46222 },
|
||||||
|
{ .temp_c = -5, .ohm = 36244 },
|
||||||
|
{ .temp_c = 0, .ohm = 28674 },
|
||||||
|
{ .temp_c = 5, .ohm = 22878 },
|
||||||
|
{ .temp_c = 10, .ohm = 18399 },
|
||||||
|
{ .temp_c = 15, .ohm = 14910 },
|
||||||
|
{ .temp_c = 20, .ohm = 12169 },
|
||||||
|
{ .temp_c = 25, .ohm = 10000 },
|
||||||
|
{ .temp_c = 30, .ohm = 8271 },
|
||||||
|
{ .temp_c = 35, .ohm = 6883 },
|
||||||
|
{ .temp_c = 40, .ohm = 5762 },
|
||||||
|
{ .temp_c = 45, .ohm = 4851 },
|
||||||
|
{ .temp_c = 50, .ohm = 4105 },
|
||||||
|
{ .temp_c = 55, .ohm = 3492 },
|
||||||
|
{ .temp_c = 60, .ohm = 2985 },
|
||||||
|
{ .temp_c = 65, .ohm = 2563 },
|
||||||
|
{ .temp_c = 70, .ohm = 2211 },
|
||||||
|
{ .temp_c = 75, .ohm = 1915 },
|
||||||
|
{ .temp_c = 80, .ohm = 1666 },
|
||||||
|
{ .temp_c = 85, .ohm = 1454 },
|
||||||
|
{ .temp_c = 90, .ohm = 1275 },
|
||||||
|
{ .temp_c = 95, .ohm = 1121 },
|
||||||
|
{ .temp_c = 100, .ohm = 990 },
|
||||||
|
{ .temp_c = 105, .ohm = 876 },
|
||||||
|
{ .temp_c = 110, .ohm = 779 },
|
||||||
|
{ .temp_c = 115, .ohm = 694 },
|
||||||
|
{ .temp_c = 120, .ohm = 620 },
|
||||||
|
{ .temp_c = 125, .ohm = 556 },
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following compensation table is from the specification of EPCOS NTC
|
* The following compensation table is from the specification of EPCOS NTC
|
||||||
* Thermistors Datasheet
|
* Thermistors Datasheet
|
||||||
@ -260,6 +298,8 @@ static const struct of_device_id ntc_match[] = {
|
|||||||
.data = &ntc_thermistor_id[5]},
|
.data = &ntc_thermistor_id[5]},
|
||||||
{ .compatible = "murata,ncp03wf104",
|
{ .compatible = "murata,ncp03wf104",
|
||||||
.data = &ntc_thermistor_id[6] },
|
.data = &ntc_thermistor_id[6] },
|
||||||
|
{ .compatible = "murata,ncp15xh103",
|
||||||
|
.data = &ntc_thermistor_id[7] },
|
||||||
|
|
||||||
/* Usage of vendor name "ntc" is deprecated */
|
/* Usage of vendor name "ntc" is deprecated */
|
||||||
{ .compatible = "ntc,ncp15wb473",
|
{ .compatible = "ntc,ncp15wb473",
|
||||||
@ -609,6 +649,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
|
|||||||
data->comp = ncpXXwf104;
|
data->comp = ncpXXwf104;
|
||||||
data->n_comp = ARRAY_SIZE(ncpXXwf104);
|
data->n_comp = ARRAY_SIZE(ncpXXwf104);
|
||||||
break;
|
break;
|
||||||
|
case TYPE_NCPXXXH103:
|
||||||
|
data->comp = ncpXXxh103;
|
||||||
|
data->n_comp = ARRAY_SIZE(ncpXXxh103);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
|
dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
|
||||||
pdev_id->driver_data, pdev_id->name);
|
pdev_id->driver_data, pdev_id->name);
|
||||||
|
@ -28,6 +28,7 @@ enum ntc_thermistor_type {
|
|||||||
TYPE_NCPXXWL333,
|
TYPE_NCPXXWL333,
|
||||||
TYPE_B57330V2103,
|
TYPE_B57330V2103,
|
||||||
TYPE_NCPXXWF104,
|
TYPE_NCPXXWF104,
|
||||||
|
TYPE_NCPXXXH103,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ntc_thermistor_platform_data {
|
struct ntc_thermistor_platform_data {
|
||||||
|
Loading…
Reference in New Issue
Block a user