All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
@ 2014-06-27 12:59 ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 12:59 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Guenter Roeck, Naveen Krishna Chatradhi, lm-sensors, linux-iio

The patch series adds support for the ntc thermistor B57330V2103 from
 EPCOS.

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 46a311e..97c9c06 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -42,6 +42,7 @@ dmo    Data Modul AG
 ebv    EBV Elektronik
 edt    Emerging Display Technologies
 emmicro    EM Microelectronic
+epcos    EPCOS AG
 epfl    Ecole Polytechnique Fédérale de Lausanne
 epson    Seiko Epson Corp.
 est    ESTeem Wireless Modems
-- 
2.0.0


>From 402f8f19051ef341fe477f914aa14f1e7e5a5e34 Mon Sep 17 00:00:00 2001
From: Johannes Pointner <johannes.pointner@gmail.com>
Date: Fri, 27 Jun 2014 14:12:02 +0200
Subject: [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from
 EPCOS

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
 Documentation/hwmon/ntc_thermistor                 |  5 +++
 drivers/hwmon/Kconfig                              |  2 +-
 drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
 include/linux/platform_data/ntc_thermistor.h       |  1 +
 5 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e..367d4a3 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -8,6 +8,7 @@ Requires node properties:
     "murata,ncp21wb473"
     "murata,ncp03wb473"
     "murata,ncp15wl333"
+    "epcos,b57330v2103"

 /* Usage of vendor name "ntc" is deprecated */
 <DEPRECATED>    "ntc,ncp15wb473"
diff --git a/Documentation/hwmon/ntc_thermistor
b/Documentation/hwmon/ntc_thermistor
index 057b770..c5e05e2 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
'ncp15wl333'
   Datasheet: Publicly available at Murata

+Supported thermistors from EPCOS:
+* EPCOS NTC Thermistors B57330V2103
+  Prefixes: b57330v2103
+  Datasheet: Publicly available at EPCOS
+
 Other NTC thermistors can be supported simply by adding compensation
 tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02d3d85..b34d673 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR

       Currently, this driver supports
       NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
-      from Murata.
+      from Murata and B57330V2103 from EPCOS.

       This driver can also be built as a module.  If so, the module
       will be called ntc-thermistor.
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index bdfbe91..25c8deb 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
     { "ncp21wb473", TYPE_NCPXXWB473 },
     { "ncp03wb473", TYPE_NCPXXWB473 },
     { "ncp15wl333", TYPE_NCPXXWL333 },
+    { "b57330v2103", TYPE_B57330V2103},
     { },
 };

@@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
     { .temp_c    = 125, .ohm    = 707 },
 };

+/*
+ * The following compensation table is from the specification of EPCOS NTC
+ * Thermistors Datasheet
+ */
+static const struct ntc_compensation b57330v2103[] = {
+    { .temp_c    = -40, .ohm    = 190030 },
+    { .temp_c    = -35, .ohm    = 145360 },
+    { .temp_c    = -30, .ohm    = 112060 },
+    { .temp_c    = -25, .ohm    = 87041 },
+    { .temp_c    = -20, .ohm    = 68104 },
+    { .temp_c    = -15, .ohm    = 53665 },
+    { .temp_c    = -10, .ohm    = 42576 },
+    { .temp_c    = -5, .ohm    = 34001 },
+    { .temp_c    = 0, .ohm    = 27326 },
+    { .temp_c    = 5, .ohm    = 22096 },
+    { .temp_c    = 10, .ohm    = 17973 },
+    { .temp_c    = 15, .ohm    = 14703 },
+    { .temp_c    = 20, .ohm    = 12090 },
+    { .temp_c    = 25, .ohm    = 10000 },
+    { .temp_c    = 30, .ohm    = 8311 },
+    { .temp_c    = 35, .ohm    = 6941 },
+    { .temp_c    = 40, .ohm    = 5825 },
+    { .temp_c    = 45, .ohm    = 4911 },
+    { .temp_c    = 50, .ohm    = 4158 },
+    { .temp_c    = 55, .ohm    = 3536 },
+    { .temp_c    = 60, .ohm    = 3019 },
+    { .temp_c    = 65, .ohm    = 2588 },
+    { .temp_c    = 70, .ohm    = 2227 },
+    { .temp_c    = 75, .ohm    = 1924 },
+    { .temp_c    = 80, .ohm    = 1668 },
+    { .temp_c    = 85, .ohm    = 1451 },
+    { .temp_c    = 90, .ohm    = 1266 },
+    { .temp_c    = 95, .ohm    = 1108 },
+    { .temp_c    = 100, .ohm    = 973 },
+    { .temp_c    = 105, .ohm    = 857 },
+    { .temp_c    = 110, .ohm    = 757 },
+    { .temp_c    = 115, .ohm    = 671 },
+    { .temp_c    = 120, .ohm    = 596 },
+    { .temp_c    = 125, .ohm    = 531 },
+};
+
 struct ntc_data {
     struct device *hwmon_dev;
     struct ntc_thermistor_platform_data *pdata;
@@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
         .data = &ntc_thermistor_id[3] },
     { .compatible = "murata,ncp15wl333",
         .data = &ntc_thermistor_id[4] },
+    { .compatible = "epcos,b57330v2103",
+        .data = &ntc_thermistor_id[5]},

     /* Usage of vendor name "ntc" is deprecated */
     { .compatible = "ntc,ncp15wb473",
@@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct
platform_device *pdev)
         data->comp = ncpXXwl333;
         data->n_comp = ARRAY_SIZE(ncpXXwl333);
         break;
+    case TYPE_B57330V2103:
+        data->comp = b57330v2103;
+        data->n_comp = ARRAY_SIZE(b57330v2103);
+        break;
     default:
         dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
                 pdev_id->driver_data, pdev_id->name);
@@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {

 module_platform_driver(ntc_thermistor_driver);

-MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
+MODULE_DESCRIPTION("NTC Thermistor Driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/include/linux/platform_data/ntc_thermistor.h
b/include/linux/platform_data/ntc_thermistor.h
index c7285b5..0a6de4c 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -26,6 +26,7 @@ struct iio_channel;
 enum ntc_thermistor_type {
     TYPE_NCPXXWB473,
     TYPE_NCPXXWL333,
+    TYPE_B57330V2103,
 };

 struct ntc_thermistor_platform_data {
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [lm-sensors] [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
@ 2014-06-27 12:59 ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 12:59 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Guenter Roeck, Naveen Krishna Chatradhi, lm-sensors, linux-iio

VGhlIHBhdGNoIHNlcmllcyBhZGRzIHN1cHBvcnQgZm9yIHRoZSBudGMgdGhlcm1pc3RvciBCNTcz
MzBWMjEwMyBmcm9tCiBFUENPUy4KClNpZ25lZC1vZmYtYnk6IEpvaGFubmVzIFBvaW50bmVyIDxq
b2hhbm5lcy5wb2ludG5lckBnbWFpbC5jb20+Ci0tLQogRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVl
L2JpbmRpbmdzL3ZlbmRvci1wcmVmaXhlcy50eHQgfCAxICsKIDEgZmlsZSBjaGFuZ2VkLCAxIGlu
c2VydGlvbigrKQoKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5n
cy92ZW5kb3ItcHJlZml4ZXMudHh0CmIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdz
L3ZlbmRvci1wcmVmaXhlcy50eHQKaW5kZXggNDZhMzExZS4uOTdjOWMwNiAxMDA2NDQKLS0tIGEv
RG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3ZlbmRvci1wcmVmaXhlcy50eHQKKysr
IGIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3ZlbmRvci1wcmVmaXhlcy50eHQK
QEAgLTQyLDYgKzQyLDcgQEAgZG1vICAgIERhdGEgTW9kdWwgQUcKIGVidiAgICBFQlYgRWxla3Ry
b25pawogZWR0ICAgIEVtZXJnaW5nIERpc3BsYXkgVGVjaG5vbG9naWVzCiBlbW1pY3JvICAgIEVN
IE1pY3JvZWxlY3Ryb25pYworZXBjb3MgICAgRVBDT1MgQUcKIGVwZmwgICAgRWNvbGUgUG9seXRl
Y2huaXF1ZSBGw6lkw6lyYWxlIGRlIExhdXNhbm5lCi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|nested] 20+ messages in thread

* Re: [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
  2014-06-27 12:59 ` [lm-sensors] " Johannes Pointner
@ 2014-06-27 14:28   ` Guenter Roeck
  -1 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-27 14:28 UTC (permalink / raw)
  To: Johannes Pointner, Jean Delvare
  Cc: Naveen Krishna Chatradhi, lm-sensors, linux-iio

On 06/27/2014 05:59 AM, Johannes Pointner wrote:
> The patch series adds support for the ntc thermistor B57330V2103 from
>   EPCOS.
>
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>

Hi Johannes,

you sent two patches in the same e-mail, and it is all corrupted.
All tabs have been replaced with spaces.

Guenter

> ---
>   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 46a311e..97c9c06 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -42,6 +42,7 @@ dmo    Data Modul AG
>   ebv    EBV Elektronik
>   edt    Emerging Display Technologies
>   emmicro    EM Microelectronic
> +epcos    EPCOS AG
>   epfl    Ecole Polytechnique Fédérale de Lausanne
>   epson    Seiko Epson Corp.
>   est    ESTeem Wireless Modems
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [lm-sensors] [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
@ 2014-06-27 14:28   ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-27 14:28 UTC (permalink / raw)
  To: Johannes Pointner, Jean Delvare
  Cc: Naveen Krishna Chatradhi, lm-sensors, linux-iio

T24gMDYvMjcvMjAxNCAwNTo1OSBBTSwgSm9oYW5uZXMgUG9pbnRuZXIgd3JvdGU6Cj4gVGh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3JvICAgIEVNIE1pY3JvZWxl
Y3Ryb25pYwo+ICtlcGNvcyAgICBFUENPUyBBRwo+ICAgZXBmbCAgICBFY29sZSBQb2x5dGVjaG5p
cXVlIEbDqWTDqXJhbGUgZGUgTGF1c2FubmUKPiAgIGVwc29uICAgIFNlaWtvIEVwc29uIENvcnAu
Cj4gICBlc3QgICAgRVNUZWVtIFdpcmVsZXNzIE1vZGVtcwo+CgoKX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbG0tc2Vuc29ycyBtYWlsaW5nIGxpc3QKbG0t
c2Vuc29yc0BsbS1zZW5zb3JzLm9yZwpodHRwOi8vbGlzdHMubG0tc2Vuc29ycy5vcmcvbWFpbG1h
bi9saXN0aW5mby9sbS1zZW5zb3Jz

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
  2014-06-27 14:28   ` [lm-sensors] " Guenter Roeck
@ 2014-06-27 17:50     ` Johannes Pointner
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 17:50 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

Hello Guenter,

sorry for that, this was my first patch.
I send the patches now separate and with supported email client.

On Friday 27 June 2014 07:28:31 Guenter Roeck wrote:
> On 06/27/2014 05:59 AM, Johannes Pointner wrote:
> > The patch series adds support for the ntc thermistor B57330V2103 from
> > 
> >   EPCOS.
> > 
> > Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
> 
> Hi Johannes,
> 
> you sent two patches in the same e-mail, and it is all corrupted.
> All tabs have been replaced with spaces.
> 
> Guenter
> 
> > ---
> > 
> >   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index 46a311e..97c9c06 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -42,6 +42,7 @@ dmo    Data Modul AG
> > 
> >   ebv    EBV Elektronik
> >   edt    Emerging Display Technologies
> >   emmicro    EM Microelectronic
> > 
> > +epcos    EPCOS AG
> > 
> >   epfl    Ecole Polytechnique Fédérale de Lausanne
> >   epson    Seiko Epson Corp.
> >   est    ESTeem Wireless Modems


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [lm-sensors] [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor
@ 2014-06-27 17:50     ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 17:50 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

Hello Guenter,

sorry for that, this was my first patch.
I send the patches now separate and with supported email client.

On Friday 27 June 2014 07:28:31 Guenter Roeck wrote:
> On 06/27/2014 05:59 AM, Johannes Pointner wrote:
> > The patch series adds support for the ntc thermistor B57330V2103 from
> > 
> >   EPCOS.
> > 
> > Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
> 
> Hi Johannes,
> 
> you sent two patches in the same e-mail, and it is all corrupted.
> All tabs have been replaced with spaces.
> 
> Guenter
> 
> > ---
> > 
> >   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index 46a311e..97c9c06 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -42,6 +42,7 @@ dmo    Data Modul AG
> > 
> >   ebv    EBV Elektronik
> >   edt    Emerging Display Technologies
> >   emmicro    EM Microelectronic
> > 
> > +epcos    EPCOS AG
> > 
> >   epfl    Ecole Polytechnique Fédérale de Lausanne
> >   epson    Seiko Epson Corp.
> >   est    ESTeem Wireless Modems


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt
  2014-06-27 14:28   ` [lm-sensors] " Guenter Roeck
@ 2014-06-27 17:53     ` Johannes Pointner
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 17:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds the vendor prefix for "epcos" to the vendor-prefixes.

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 46a311e..97c9c06 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -42,6 +42,7 @@ dmo	Data Modul AG
 ebv	EBV Elektronik
 edt	Emerging Display Technologies
 emmicro	EM Microelectronic
+epcos	EPCOS AG
 epfl	Ecole Polytechnique Fédérale de Lausanne
 epson	Seiko Epson Corp.
 est	ESTeem Wireless Modems
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [lm-sensors] [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt
@ 2014-06-27 17:53     ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 17:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds the vendor prefix for "epcos" to the vendor-prefixes.

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 46a311e..97c9c06 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -42,6 +42,7 @@ dmo	Data Modul AG
 ebv	EBV Elektronik
 edt	Emerging Display Technologies
 emmicro	EM Microelectronic
+epcos	EPCOS AG
 epfl	Ecole Polytechnique Fédérale de Lausanne
 epson	Seiko Epson Corp.
 est	ESTeem Wireless Modems
-- 
2.0.0

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from  EPCOS
  2014-06-27 14:28   ` [lm-sensors] " Guenter Roeck
@ 2014-06-27 18:01     ` Johannes Pointner
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 18:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds support for the ntc thermistor B57330V2103 from  EPCOS.


Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
 Documentation/hwmon/ntc_thermistor                 |  5 +++
 drivers/hwmon/Kconfig                              |  2 +-
 drivers/hwmon/ntc_thermistor.c                     | 50 
+++++++++++++++++++++-
 include/linux/platform_data/ntc_thermistor.h       |  1 +
 5 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt 
b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e..367d4a3 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -8,6 +8,7 @@ Requires node properties:
 	"murata,ncp21wb473"
 	"murata,ncp03wb473"
 	"murata,ncp15wl333"
+	"epcos,b57330v2103"
 
 /* Usage of vendor name "ntc" is deprecated */
 <DEPRECATED>	"ntc,ncp15wb473"
diff --git a/Documentation/hwmon/ntc_thermistor 
b/Documentation/hwmon/ntc_thermistor
index 057b770..c5e05e2 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 
'ncp15wl333'
   Datasheet: Publicly available at Murata
 
+Supported thermistors from EPCOS:
+* EPCOS NTC Thermistors B57330V2103
+  Prefixes: b57330v2103
+  Datasheet: Publicly available at EPCOS
+
 Other NTC thermistors can be supported simply by adding compensation
 tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02d3d85..b34d673 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
 
 	  Currently, this driver supports
 	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
-	  from Murata.
+	  from Murata and B57330V2103 from EPCOS.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called ntc-thermistor.
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index bdfbe91..25c8deb 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = 
{
 	{ "ncp21wb473", TYPE_NCPXXWB473 },
 	{ "ncp03wb473", TYPE_NCPXXWB473 },
 	{ "ncp15wl333", TYPE_NCPXXWL333 },
+	{ "b57330v2103", TYPE_B57330V2103},
 	{ },
 };
 
@@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
 	{ .temp_c	= 125, .ohm	= 707 },
 };
 
+/*
+ * The following compensation table is from the specification of EPCOS NTC
+ * Thermistors Datasheet
+ */
+static const struct ntc_compensation b57330v2103[] = {
+	{ .temp_c	= -40, .ohm	= 190030 },
+	{ .temp_c	= -35, .ohm	= 145360 },
+	{ .temp_c	= -30, .ohm	= 112060 },
+	{ .temp_c	= -25, .ohm	= 87041 },
+	{ .temp_c	= -20, .ohm	= 68104 },
+	{ .temp_c	= -15, .ohm	= 53665 },
+	{ .temp_c	= -10, .ohm	= 42576 },
+	{ .temp_c	= -5, .ohm	= 34001 },
+	{ .temp_c	= 0, .ohm	= 27326 },
+	{ .temp_c	= 5, .ohm	= 22096 },
+	{ .temp_c	= 10, .ohm	= 17973 },
+	{ .temp_c	= 15, .ohm	= 14703 },
+	{ .temp_c	= 20, .ohm	= 12090 },
+	{ .temp_c	= 25, .ohm	= 10000 },
+	{ .temp_c	= 30, .ohm	= 8311 },
+	{ .temp_c	= 35, .ohm	= 6941 },
+	{ .temp_c	= 40, .ohm	= 5825 },
+	{ .temp_c	= 45, .ohm	= 4911 },
+	{ .temp_c	= 50, .ohm	= 4158 },
+	{ .temp_c	= 55, .ohm	= 3536 },
+	{ .temp_c	= 60, .ohm	= 3019 },
+	{ .temp_c	= 65, .ohm	= 2588 },
+	{ .temp_c	= 70, .ohm	= 2227 },
+	{ .temp_c	= 75, .ohm	= 1924 },
+	{ .temp_c	= 80, .ohm	= 1668 },
+	{ .temp_c	= 85, .ohm	= 1451 },
+	{ .temp_c	= 90, .ohm	= 1266 },
+	{ .temp_c	= 95, .ohm	= 1108 },
+	{ .temp_c	= 100, .ohm	= 973 },
+	{ .temp_c	= 105, .ohm	= 857 },
+	{ .temp_c	= 110, .ohm	= 757 },
+	{ .temp_c	= 115, .ohm	= 671 },
+	{ .temp_c	= 120, .ohm	= 596 },
+	{ .temp_c	= 125, .ohm	= 531 },
+};
+
 struct ntc_data {
 	struct device *hwmon_dev;
 	struct ntc_thermistor_platform_data *pdata;
@@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
 		.data = &ntc_thermistor_id[3] },
 	{ .compatible = "murata,ncp15wl333",
 		.data = &ntc_thermistor_id[4] },
+	{ .compatible = "epcos,b57330v2103",
+		.data = &ntc_thermistor_id[5]},
 
 	/* Usage of vendor name "ntc" is deprecated */
 	{ .compatible = "ntc,ncp15wb473",
@@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device 
*pdev)
 		data->comp = ncpXXwl333;
 		data->n_comp = ARRAY_SIZE(ncpXXwl333);
 		break;
+	case TYPE_B57330V2103:
+		data->comp = b57330v2103;
+		data->n_comp = ARRAY_SIZE(b57330v2103);
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
 				pdev_id->driver_data, pdev_id->name);
@@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
 
 module_platform_driver(ntc_thermistor_driver);
 
-MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
+MODULE_DESCRIPTION("NTC Thermistor Driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/include/linux/platform_data/ntc_thermistor.h 
b/include/linux/platform_data/ntc_thermistor.h
index c7285b5..0a6de4c 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -26,6 +26,7 @@ struct iio_channel;
 enum ntc_thermistor_type {
 	TYPE_NCPXXWB473,
 	TYPE_NCPXXWL333,
+	TYPE_B57330V2103,
 };
 
 struct ntc_thermistor_platform_data {
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [lm-sensors] [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from EPCOS
@ 2014-06-27 18:01     ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-06-27 18:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds support for the ntc thermistor B57330V2103 from  EPCOS.


Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
 Documentation/hwmon/ntc_thermistor                 |  5 +++
 drivers/hwmon/Kconfig                              |  2 +-
 drivers/hwmon/ntc_thermistor.c                     | 50 
+++++++++++++++++++++-
 include/linux/platform_data/ntc_thermistor.h       |  1 +
 5 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt 
b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e..367d4a3 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -8,6 +8,7 @@ Requires node properties:
 	"murata,ncp21wb473"
 	"murata,ncp03wb473"
 	"murata,ncp15wl333"
+	"epcos,b57330v2103"
 
 /* Usage of vendor name "ntc" is deprecated */
 <DEPRECATED>	"ntc,ncp15wb473"
diff --git a/Documentation/hwmon/ntc_thermistor 
b/Documentation/hwmon/ntc_thermistor
index 057b770..c5e05e2 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 
'ncp15wl333'
   Datasheet: Publicly available at Murata
 
+Supported thermistors from EPCOS:
+* EPCOS NTC Thermistors B57330V2103
+  Prefixes: b57330v2103
+  Datasheet: Publicly available at EPCOS
+
 Other NTC thermistors can be supported simply by adding compensation
 tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02d3d85..b34d673 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
 
 	  Currently, this driver supports
 	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
-	  from Murata.
+	  from Murata and B57330V2103 from EPCOS.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called ntc-thermistor.
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index bdfbe91..25c8deb 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = 
{
 	{ "ncp21wb473", TYPE_NCPXXWB473 },
 	{ "ncp03wb473", TYPE_NCPXXWB473 },
 	{ "ncp15wl333", TYPE_NCPXXWL333 },
+	{ "b57330v2103", TYPE_B57330V2103},
 	{ },
 };
 
@@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
 	{ .temp_c	= 125, .ohm	= 707 },
 };
 
+/*
+ * The following compensation table is from the specification of EPCOS NTC
+ * Thermistors Datasheet
+ */
+static const struct ntc_compensation b57330v2103[] = {
+	{ .temp_c	= -40, .ohm	= 190030 },
+	{ .temp_c	= -35, .ohm	= 145360 },
+	{ .temp_c	= -30, .ohm	= 112060 },
+	{ .temp_c	= -25, .ohm	= 87041 },
+	{ .temp_c	= -20, .ohm	= 68104 },
+	{ .temp_c	= -15, .ohm	= 53665 },
+	{ .temp_c	= -10, .ohm	= 42576 },
+	{ .temp_c	= -5, .ohm	= 34001 },
+	{ .temp_c	= 0, .ohm	= 27326 },
+	{ .temp_c	= 5, .ohm	= 22096 },
+	{ .temp_c	= 10, .ohm	= 17973 },
+	{ .temp_c	= 15, .ohm	= 14703 },
+	{ .temp_c	= 20, .ohm	= 12090 },
+	{ .temp_c	= 25, .ohm	= 10000 },
+	{ .temp_c	= 30, .ohm	= 8311 },
+	{ .temp_c	= 35, .ohm	= 6941 },
+	{ .temp_c	= 40, .ohm	= 5825 },
+	{ .temp_c	= 45, .ohm	= 4911 },
+	{ .temp_c	= 50, .ohm	= 4158 },
+	{ .temp_c	= 55, .ohm	= 3536 },
+	{ .temp_c	= 60, .ohm	= 3019 },
+	{ .temp_c	= 65, .ohm	= 2588 },
+	{ .temp_c	= 70, .ohm	= 2227 },
+	{ .temp_c	= 75, .ohm	= 1924 },
+	{ .temp_c	= 80, .ohm	= 1668 },
+	{ .temp_c	= 85, .ohm	= 1451 },
+	{ .temp_c	= 90, .ohm	= 1266 },
+	{ .temp_c	= 95, .ohm	= 1108 },
+	{ .temp_c	= 100, .ohm	= 973 },
+	{ .temp_c	= 105, .ohm	= 857 },
+	{ .temp_c	= 110, .ohm	= 757 },
+	{ .temp_c	= 115, .ohm	= 671 },
+	{ .temp_c	= 120, .ohm	= 596 },
+	{ .temp_c	= 125, .ohm	= 531 },
+};
+
 struct ntc_data {
 	struct device *hwmon_dev;
 	struct ntc_thermistor_platform_data *pdata;
@@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
 		.data = &ntc_thermistor_id[3] },
 	{ .compatible = "murata,ncp15wl333",
 		.data = &ntc_thermistor_id[4] },
+	{ .compatible = "epcos,b57330v2103",
+		.data = &ntc_thermistor_id[5]},
 
 	/* Usage of vendor name "ntc" is deprecated */
 	{ .compatible = "ntc,ncp15wb473",
@@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device 
*pdev)
 		data->comp = ncpXXwl333;
 		data->n_comp = ARRAY_SIZE(ncpXXwl333);
 		break;
+	case TYPE_B57330V2103:
+		data->comp = b57330v2103;
+		data->n_comp = ARRAY_SIZE(b57330v2103);
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
 				pdev_id->driver_data, pdev_id->name);
@@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
 
 module_platform_driver(ntc_thermistor_driver);
 
-MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
+MODULE_DESCRIPTION("NTC Thermistor Driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/include/linux/platform_data/ntc_thermistor.h 
b/include/linux/platform_data/ntc_thermistor.h
index c7285b5..0a6de4c 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -26,6 +26,7 @@ struct iio_channel;
 enum ntc_thermistor_type {
 	TYPE_NCPXXWB473,
 	TYPE_NCPXXWL333,
+	TYPE_B57330V2103,
 };
 
 struct ntc_thermistor_platform_data {
-- 
2.0.0


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt
  2014-06-27 17:53     ` [lm-sensors] " Johannes Pointner
  (?)
@ 2014-06-29 19:45       ` Guenter Roeck
  -1 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-29 19:45 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio,
	devicetree@vger.kernel.org

On 06/27/2014 10:53 AM, Johannes Pointner wrote:
> This patch adds the vendor prefix for "epcos" to the vendor-prefixes.
>
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>

Copying devicetree mailing list for Ack.

Guenter

> ---
>   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 46a311e..97c9c06 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -42,6 +42,7 @@ dmo	Data Modul AG
>   ebv	EBV Elektronik
>   edt	Emerging Display Technologies
>   emmicro	EM Microelectronic
> +epcos	EPCOS AG
>   epfl	Ecole Polytechnique Fédérale de Lausanne
>   epson	Seiko Epson Corp.
>   est	ESTeem Wireless Modems
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [lm-sensors] [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt
@ 2014-06-29 19:45       ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-29 19:45 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 06/27/2014 10:53 AM, Johannes Pointner wrote:
> This patch adds the vendor prefix for "epcos" to the vendor-prefixes.
>
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>

Copying devicetree mailing list for Ack.

Guenter

> ---
>   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 46a311e..97c9c06 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -42,6 +42,7 @@ dmo	Data Modul AG
>   ebv	EBV Elektronik
>   edt	Emerging Display Technologies
>   emmicro	EM Microelectronic
> +epcos	EPCOS AG
>   epfl	Ecole Polytechnique Fédérale de Lausanne
>   epson	Seiko Epson Corp.
>   est	ESTeem Wireless Modems
>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt
@ 2014-06-29 19:45       ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-29 19:45 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 06/27/2014 10:53 AM, Johannes Pointner wrote:
> This patch adds the vendor prefix for "epcos" to the vendor-prefixes.
>
> Signed-off-by: Johannes Pointner <johannes.pointner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Copying devicetree mailing list for Ack.

Guenter

> ---
>   Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 46a311e..97c9c06 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -42,6 +42,7 @@ dmo	Data Modul AG
>   ebv	EBV Elektronik
>   edt	Emerging Display Technologies
>   emmicro	EM Microelectronic
> +epcos	EPCOS AG
>   epfl	Ecole Polytechnique Fédérale de Lausanne
>   epson	Seiko Epson Corp.
>   est	ESTeem Wireless Modems
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from EPCOS
  2014-06-27 18:01     ` [lm-sensors] " Johannes Pointner
@ 2014-06-29 19:53       ` Guenter Roeck
  -1 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-29 19:53 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

On 06/27/2014 11:01 AM, Johannes Pointner wrote:
> This patch adds support for the ntc thermistor B57330V2103 from  EPCOS.
>

/from  EPSOS/from EPCOS/

>
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
> ---
>   .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
>   Documentation/hwmon/ntc_thermistor                 |  5 +++
>   drivers/hwmon/Kconfig                              |  2 +-
>   drivers/hwmon/ntc_thermistor.c                     | 50
> +++++++++++++++++++++-
>   include/linux/platform_data/ntc_thermistor.h       |  1 +
>   5 files changed, 57 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> index b117b2e..367d4a3 100644
> --- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> @@ -8,6 +8,7 @@ Requires node properties:
>   	"murata,ncp21wb473"
>   	"murata,ncp03wb473"
>   	"murata,ncp15wl333"
> +	"epcos,b57330v2103"

Please keep this list in alphabetical order.

>
>   /* Usage of vendor name "ntc" is deprecated */
>   <DEPRECATED>	"ntc,ncp15wb473"
> diff --git a/Documentation/hwmon/ntc_thermistor
> b/Documentation/hwmon/ntc_thermistor
> index 057b770..c5e05e2 100644
> --- a/Documentation/hwmon/ntc_thermistor
> +++ b/Documentation/hwmon/ntc_thermistor
> @@ -6,6 +6,11 @@ Supported thermistors from Murata:
>     Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
> 'ncp15wl333'

Looks like a wrapped line here, which corrupts the patch.


>     Datasheet: Publicly available at Murata
>
> +Supported thermistors from EPCOS:
> +* EPCOS NTC Thermistors B57330V2103
> +  Prefixes: b57330v2103
> +  Datasheet: Publicly available at EPCOS
> +
>   Other NTC thermistors can be supported simply by adding compensation
>   tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 02d3d85..b34d673 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
>
>   	  Currently, this driver supports
>   	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
> -	  from Murata.
> +	  from Murata and B57330V2103 from EPCOS.
>
>   	  This driver can also be built as a module.  If so, the module
>   	  will be called ntc-thermistor.
> diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
> index bdfbe91..25c8deb 100644
> --- a/drivers/hwmon/ntc_thermistor.c
> +++ b/drivers/hwmon/ntc_thermistor.c
> @@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] =
> {
>   	{ "ncp21wb473", TYPE_NCPXXWB473 },
>   	{ "ncp03wb473", TYPE_NCPXXWB473 },
>   	{ "ncp15wl333", TYPE_NCPXXWL333 },
> +	{ "b57330v2103", TYPE_B57330V2103},
>   	{ },
>   };
>
> @@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
>   	{ .temp_c	= 125, .ohm	= 707 },
>   };
>
> +/*
> + * The following compensation table is from the specification of EPCOS NTC
> + * Thermistors Datasheet
> + */
> +static const struct ntc_compensation b57330v2103[] = {
> +	{ .temp_c	= -40, .ohm	= 190030 },
> +	{ .temp_c	= -35, .ohm	= 145360 },
> +	{ .temp_c	= -30, .ohm	= 112060 },
> +	{ .temp_c	= -25, .ohm	= 87041 },
> +	{ .temp_c	= -20, .ohm	= 68104 },
> +	{ .temp_c	= -15, .ohm	= 53665 },
> +	{ .temp_c	= -10, .ohm	= 42576 },
> +	{ .temp_c	= -5, .ohm	= 34001 },
> +	{ .temp_c	= 0, .ohm	= 27326 },
> +	{ .temp_c	= 5, .ohm	= 22096 },
> +	{ .temp_c	= 10, .ohm	= 17973 },
> +	{ .temp_c	= 15, .ohm	= 14703 },
> +	{ .temp_c	= 20, .ohm	= 12090 },
> +	{ .temp_c	= 25, .ohm	= 10000 },
> +	{ .temp_c	= 30, .ohm	= 8311 },
> +	{ .temp_c	= 35, .ohm	= 6941 },
> +	{ .temp_c	= 40, .ohm	= 5825 },
> +	{ .temp_c	= 45, .ohm	= 4911 },
> +	{ .temp_c	= 50, .ohm	= 4158 },
> +	{ .temp_c	= 55, .ohm	= 3536 },
> +	{ .temp_c	= 60, .ohm	= 3019 },
> +	{ .temp_c	= 65, .ohm	= 2588 },
> +	{ .temp_c	= 70, .ohm	= 2227 },
> +	{ .temp_c	= 75, .ohm	= 1924 },
> +	{ .temp_c	= 80, .ohm	= 1668 },
> +	{ .temp_c	= 85, .ohm	= 1451 },
> +	{ .temp_c	= 90, .ohm	= 1266 },
> +	{ .temp_c	= 95, .ohm	= 1108 },
> +	{ .temp_c	= 100, .ohm	= 973 },
> +	{ .temp_c	= 105, .ohm	= 857 },
> +	{ .temp_c	= 110, .ohm	= 757 },
> +	{ .temp_c	= 115, .ohm	= 671 },
> +	{ .temp_c	= 120, .ohm	= 596 },
> +	{ .temp_c	= 125, .ohm	= 531 },
> +};
> +
>   struct ntc_data {
>   	struct device *hwmon_dev;
>   	struct ntc_thermistor_platform_data *pdata;
> @@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
>   		.data = &ntc_thermistor_id[3] },
>   	{ .compatible = "murata,ncp15wl333",
>   		.data = &ntc_thermistor_id[4] },
> +	{ .compatible = "epcos,b57330v2103",
> +		.data = &ntc_thermistor_id[5]},
>
>   	/* Usage of vendor name "ntc" is deprecated */
>   	{ .compatible = "ntc,ncp15wb473",
> @@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device
> *pdev)
>   		data->comp = ncpXXwl333;
>   		data->n_comp = ARRAY_SIZE(ncpXXwl333);
>   		break;
> +	case TYPE_B57330V2103:
> +		data->comp = b57330v2103;
> +		data->n_comp = ARRAY_SIZE(b57330v2103);
> +		break;
>   	default:
>   		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
>   				pdev_id->driver_data, pdev_id->name);
> @@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
>
>   module_platform_driver(ntc_thermistor_driver);
>
> -MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
> +MODULE_DESCRIPTION("NTC Thermistor Driver");
>   MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
>   MODULE_LICENSE("GPL");
>   MODULE_ALIAS("platform:ntc-thermistor");
> diff --git a/include/linux/platform_data/ntc_thermistor.h
> b/include/linux/platform_data/ntc_thermistor.h
> index c7285b5..0a6de4c 100644
> --- a/include/linux/platform_data/ntc_thermistor.h
> +++ b/include/linux/platform_data/ntc_thermistor.h
> @@ -26,6 +26,7 @@ struct iio_channel;
>   enum ntc_thermistor_type {
>   	TYPE_NCPXXWB473,
>   	TYPE_NCPXXWL333,
> +	TYPE_B57330V2103,
>   };
>
>   struct ntc_thermistor_platform_data {
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [lm-sensors] [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from EPCOS
@ 2014-06-29 19:53       ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-06-29 19:53 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

On 06/27/2014 11:01 AM, Johannes Pointner wrote:
> This patch adds support for the ntc thermistor B57330V2103 from  EPCOS.
>

/from  EPSOS/from EPCOS/

>
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
> ---
>   .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
>   Documentation/hwmon/ntc_thermistor                 |  5 +++
>   drivers/hwmon/Kconfig                              |  2 +-
>   drivers/hwmon/ntc_thermistor.c                     | 50
> +++++++++++++++++++++-
>   include/linux/platform_data/ntc_thermistor.h       |  1 +
>   5 files changed, 57 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> index b117b2e..367d4a3 100644
> --- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> @@ -8,6 +8,7 @@ Requires node properties:
>   	"murata,ncp21wb473"
>   	"murata,ncp03wb473"
>   	"murata,ncp15wl333"
> +	"epcos,b57330v2103"

Please keep this list in alphabetical order.

>
>   /* Usage of vendor name "ntc" is deprecated */
>   <DEPRECATED>	"ntc,ncp15wb473"
> diff --git a/Documentation/hwmon/ntc_thermistor
> b/Documentation/hwmon/ntc_thermistor
> index 057b770..c5e05e2 100644
> --- a/Documentation/hwmon/ntc_thermistor
> +++ b/Documentation/hwmon/ntc_thermistor
> @@ -6,6 +6,11 @@ Supported thermistors from Murata:
>     Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
> 'ncp15wl333'

Looks like a wrapped line here, which corrupts the patch.


>     Datasheet: Publicly available at Murata
>
> +Supported thermistors from EPCOS:
> +* EPCOS NTC Thermistors B57330V2103
> +  Prefixes: b57330v2103
> +  Datasheet: Publicly available at EPCOS
> +
>   Other NTC thermistors can be supported simply by adding compensation
>   tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 02d3d85..b34d673 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
>
>   	  Currently, this driver supports
>   	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
> -	  from Murata.
> +	  from Murata and B57330V2103 from EPCOS.
>
>   	  This driver can also be built as a module.  If so, the module
>   	  will be called ntc-thermistor.
> diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
> index bdfbe91..25c8deb 100644
> --- a/drivers/hwmon/ntc_thermistor.c
> +++ b/drivers/hwmon/ntc_thermistor.c
> @@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] > {
>   	{ "ncp21wb473", TYPE_NCPXXWB473 },
>   	{ "ncp03wb473", TYPE_NCPXXWB473 },
>   	{ "ncp15wl333", TYPE_NCPXXWL333 },
> +	{ "b57330v2103", TYPE_B57330V2103},
>   	{ },
>   };
>
> @@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
>   	{ .temp_c	= 125, .ohm	= 707 },
>   };
>
> +/*
> + * The following compensation table is from the specification of EPCOS NTC
> + * Thermistors Datasheet
> + */
> +static const struct ntc_compensation b57330v2103[] = {
> +	{ .temp_c	= -40, .ohm	= 190030 },
> +	{ .temp_c	= -35, .ohm	= 145360 },
> +	{ .temp_c	= -30, .ohm	= 112060 },
> +	{ .temp_c	= -25, .ohm	= 87041 },
> +	{ .temp_c	= -20, .ohm	= 68104 },
> +	{ .temp_c	= -15, .ohm	= 53665 },
> +	{ .temp_c	= -10, .ohm	= 42576 },
> +	{ .temp_c	= -5, .ohm	= 34001 },
> +	{ .temp_c	= 0, .ohm	= 27326 },
> +	{ .temp_c	= 5, .ohm	= 22096 },
> +	{ .temp_c	= 10, .ohm	= 17973 },
> +	{ .temp_c	= 15, .ohm	= 14703 },
> +	{ .temp_c	= 20, .ohm	= 12090 },
> +	{ .temp_c	= 25, .ohm	= 10000 },
> +	{ .temp_c	= 30, .ohm	= 8311 },
> +	{ .temp_c	= 35, .ohm	= 6941 },
> +	{ .temp_c	= 40, .ohm	= 5825 },
> +	{ .temp_c	= 45, .ohm	= 4911 },
> +	{ .temp_c	= 50, .ohm	= 4158 },
> +	{ .temp_c	= 55, .ohm	= 3536 },
> +	{ .temp_c	= 60, .ohm	= 3019 },
> +	{ .temp_c	= 65, .ohm	= 2588 },
> +	{ .temp_c	= 70, .ohm	= 2227 },
> +	{ .temp_c	= 75, .ohm	= 1924 },
> +	{ .temp_c	= 80, .ohm	= 1668 },
> +	{ .temp_c	= 85, .ohm	= 1451 },
> +	{ .temp_c	= 90, .ohm	= 1266 },
> +	{ .temp_c	= 95, .ohm	= 1108 },
> +	{ .temp_c	= 100, .ohm	= 973 },
> +	{ .temp_c	= 105, .ohm	= 857 },
> +	{ .temp_c	= 110, .ohm	= 757 },
> +	{ .temp_c	= 115, .ohm	= 671 },
> +	{ .temp_c	= 120, .ohm	= 596 },
> +	{ .temp_c	= 125, .ohm	= 531 },
> +};
> +
>   struct ntc_data {
>   	struct device *hwmon_dev;
>   	struct ntc_thermistor_platform_data *pdata;
> @@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
>   		.data = &ntc_thermistor_id[3] },
>   	{ .compatible = "murata,ncp15wl333",
>   		.data = &ntc_thermistor_id[4] },
> +	{ .compatible = "epcos,b57330v2103",
> +		.data = &ntc_thermistor_id[5]},
>
>   	/* Usage of vendor name "ntc" is deprecated */
>   	{ .compatible = "ntc,ncp15wb473",
> @@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device
> *pdev)
>   		data->comp = ncpXXwl333;
>   		data->n_comp = ARRAY_SIZE(ncpXXwl333);
>   		break;
> +	case TYPE_B57330V2103:
> +		data->comp = b57330v2103;
> +		data->n_comp = ARRAY_SIZE(b57330v2103);
> +		break;
>   	default:
>   		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
>   				pdev_id->driver_data, pdev_id->name);
> @@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
>
>   module_platform_driver(ntc_thermistor_driver);
>
> -MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
> +MODULE_DESCRIPTION("NTC Thermistor Driver");
>   MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
>   MODULE_LICENSE("GPL");
>   MODULE_ALIAS("platform:ntc-thermistor");
> diff --git a/include/linux/platform_data/ntc_thermistor.h
> b/include/linux/platform_data/ntc_thermistor.h
> index c7285b5..0a6de4c 100644
> --- a/include/linux/platform_data/ntc_thermistor.h
> +++ b/include/linux/platform_data/ntc_thermistor.h
> @@ -26,6 +26,7 @@ struct iio_channel;
>   enum ntc_thermistor_type {
>   	TYPE_NCPXXWB473,
>   	TYPE_NCPXXWL333,
> +	TYPE_B57330V2103,
>   };
>
>   struct ntc_thermistor_platform_data {
>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 20+ messages in thread

* PATCH 2/2 v2] Adds support for the ntc thermistor B57330V2103 from  EPCOS
  2014-06-27 18:01     ` [lm-sensors] " Johannes Pointner
@ 2014-07-01  6:05       ` Johannes Pointner
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-07-01  6:05 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds support for the ntc thermistor B57330V2103 from EPCOS.

Change since v1:
1. Rearranged compatible node values alphabetically
2. Fixed wrapped line

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
 Documentation/hwmon/ntc_thermistor                 |  5 +++
 drivers/hwmon/Kconfig                              |  2 +-
 drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
 include/linux/platform_data/ntc_thermistor.h       |  1 +
 5 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e..2391e5c 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
 
 Requires node properties:
 - "compatible" value : one of
+	"epcos,b57330v2103"
 	"murata,ncp15wb473"
 	"murata,ncp18wb473"
 	"murata,ncp21wb473"
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
index 057b770..c5e05e2 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
   Datasheet: Publicly available at Murata
 
+Supported thermistors from EPCOS:
+* EPCOS NTC Thermistors B57330V2103
+  Prefixes: b57330v2103
+  Datasheet: Publicly available at EPCOS
+
 Other NTC thermistors can be supported simply by adding compensation
 tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02d3d85..b34d673 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
 
 	  Currently, this driver supports
 	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
-	  from Murata.
+	  from Murata and B57330V2103 from EPCOS.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called ntc-thermistor.
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index bdfbe91..25c8deb 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
 	{ "ncp21wb473", TYPE_NCPXXWB473 },
 	{ "ncp03wb473", TYPE_NCPXXWB473 },
 	{ "ncp15wl333", TYPE_NCPXXWL333 },
+	{ "b57330v2103", TYPE_B57330V2103},
 	{ },
 };
 
@@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
 	{ .temp_c	= 125, .ohm	= 707 },
 };
 
+/*
+ * The following compensation table is from the specification of EPCOS NTC
+ * Thermistors Datasheet
+ */
+static const struct ntc_compensation b57330v2103[] = {
+	{ .temp_c	= -40, .ohm	= 190030 },
+	{ .temp_c	= -35, .ohm	= 145360 },
+	{ .temp_c	= -30, .ohm	= 112060 },
+	{ .temp_c	= -25, .ohm	= 87041 },
+	{ .temp_c	= -20, .ohm	= 68104 },
+	{ .temp_c	= -15, .ohm	= 53665 },
+	{ .temp_c	= -10, .ohm	= 42576 },
+	{ .temp_c	= -5, .ohm	= 34001 },
+	{ .temp_c	= 0, .ohm	= 27326 },
+	{ .temp_c	= 5, .ohm	= 22096 },
+	{ .temp_c	= 10, .ohm	= 17973 },
+	{ .temp_c	= 15, .ohm	= 14703 },
+	{ .temp_c	= 20, .ohm	= 12090 },
+	{ .temp_c	= 25, .ohm	= 10000 },
+	{ .temp_c	= 30, .ohm	= 8311 },
+	{ .temp_c	= 35, .ohm	= 6941 },
+	{ .temp_c	= 40, .ohm	= 5825 },
+	{ .temp_c	= 45, .ohm	= 4911 },
+	{ .temp_c	= 50, .ohm	= 4158 },
+	{ .temp_c	= 55, .ohm	= 3536 },
+	{ .temp_c	= 60, .ohm	= 3019 },
+	{ .temp_c	= 65, .ohm	= 2588 },
+	{ .temp_c	= 70, .ohm	= 2227 },
+	{ .temp_c	= 75, .ohm	= 1924 },
+	{ .temp_c	= 80, .ohm	= 1668 },
+	{ .temp_c	= 85, .ohm	= 1451 },
+	{ .temp_c	= 90, .ohm	= 1266 },
+	{ .temp_c	= 95, .ohm	= 1108 },
+	{ .temp_c	= 100, .ohm	= 973 },
+	{ .temp_c	= 105, .ohm	= 857 },
+	{ .temp_c	= 110, .ohm	= 757 },
+	{ .temp_c	= 115, .ohm	= 671 },
+	{ .temp_c	= 120, .ohm	= 596 },
+	{ .temp_c	= 125, .ohm	= 531 },
+};
+
 struct ntc_data {
 	struct device *hwmon_dev;
 	struct ntc_thermistor_platform_data *pdata;
@@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
 		.data = &ntc_thermistor_id[3] },
 	{ .compatible = "murata,ncp15wl333",
 		.data = &ntc_thermistor_id[4] },
+	{ .compatible = "epcos,b57330v2103",
+		.data = &ntc_thermistor_id[5]},
 
 	/* Usage of vendor name "ntc" is deprecated */
 	{ .compatible = "ntc,ncp15wb473",
@@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
 		data->comp = ncpXXwl333;
 		data->n_comp = ARRAY_SIZE(ncpXXwl333);
 		break;
+	case TYPE_B57330V2103:
+		data->comp = b57330v2103;
+		data->n_comp = ARRAY_SIZE(b57330v2103);
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
 				pdev_id->driver_data, pdev_id->name);
@@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
 
 module_platform_driver(ntc_thermistor_driver);
 
-MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
+MODULE_DESCRIPTION("NTC Thermistor Driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
index c7285b5..0a6de4c 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -26,6 +26,7 @@ struct iio_channel;
 enum ntc_thermistor_type {
 	TYPE_NCPXXWB473,
 	TYPE_NCPXXWL333,
+	TYPE_B57330V2103,
 };
 
 struct ntc_thermistor_platform_data {
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [lm-sensors] PATCH 2/2 v2] Adds support for the ntc thermistor B57330V2103 from EPCOS
@ 2014-07-01  6:05       ` Johannes Pointner
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Pointner @ 2014-07-01  6:05 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio

This patch adds support for the ntc thermistor B57330V2103 from EPCOS.

Change since v1:
1. Rearranged compatible node values alphabetically
2. Fixed wrapped line

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
---
 .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
 Documentation/hwmon/ntc_thermistor                 |  5 +++
 drivers/hwmon/Kconfig                              |  2 +-
 drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
 include/linux/platform_data/ntc_thermistor.h       |  1 +
 5 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index b117b2e..2391e5c 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
 
 Requires node properties:
 - "compatible" value : one of
+	"epcos,b57330v2103"
 	"murata,ncp15wb473"
 	"murata,ncp18wb473"
 	"murata,ncp21wb473"
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
index 057b770..c5e05e2 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -6,6 +6,11 @@ Supported thermistors from Murata:
   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
   Datasheet: Publicly available at Murata
 
+Supported thermistors from EPCOS:
+* EPCOS NTC Thermistors B57330V2103
+  Prefixes: b57330v2103
+  Datasheet: Publicly available at EPCOS
+
 Other NTC thermistors can be supported simply by adding compensation
 tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 02d3d85..b34d673 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
 
 	  Currently, this driver supports
 	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
-	  from Murata.
+	  from Murata and B57330V2103 from EPCOS.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called ntc-thermistor.
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index bdfbe91..25c8deb 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
 	{ "ncp21wb473", TYPE_NCPXXWB473 },
 	{ "ncp03wb473", TYPE_NCPXXWB473 },
 	{ "ncp15wl333", TYPE_NCPXXWL333 },
+	{ "b57330v2103", TYPE_B57330V2103},
 	{ },
 };
 
@@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
 	{ .temp_c	= 125, .ohm	= 707 },
 };
 
+/*
+ * The following compensation table is from the specification of EPCOS NTC
+ * Thermistors Datasheet
+ */
+static const struct ntc_compensation b57330v2103[] = {
+	{ .temp_c	= -40, .ohm	= 190030 },
+	{ .temp_c	= -35, .ohm	= 145360 },
+	{ .temp_c	= -30, .ohm	= 112060 },
+	{ .temp_c	= -25, .ohm	= 87041 },
+	{ .temp_c	= -20, .ohm	= 68104 },
+	{ .temp_c	= -15, .ohm	= 53665 },
+	{ .temp_c	= -10, .ohm	= 42576 },
+	{ .temp_c	= -5, .ohm	= 34001 },
+	{ .temp_c	= 0, .ohm	= 27326 },
+	{ .temp_c	= 5, .ohm	= 22096 },
+	{ .temp_c	= 10, .ohm	= 17973 },
+	{ .temp_c	= 15, .ohm	= 14703 },
+	{ .temp_c	= 20, .ohm	= 12090 },
+	{ .temp_c	= 25, .ohm	= 10000 },
+	{ .temp_c	= 30, .ohm	= 8311 },
+	{ .temp_c	= 35, .ohm	= 6941 },
+	{ .temp_c	= 40, .ohm	= 5825 },
+	{ .temp_c	= 45, .ohm	= 4911 },
+	{ .temp_c	= 50, .ohm	= 4158 },
+	{ .temp_c	= 55, .ohm	= 3536 },
+	{ .temp_c	= 60, .ohm	= 3019 },
+	{ .temp_c	= 65, .ohm	= 2588 },
+	{ .temp_c	= 70, .ohm	= 2227 },
+	{ .temp_c	= 75, .ohm	= 1924 },
+	{ .temp_c	= 80, .ohm	= 1668 },
+	{ .temp_c	= 85, .ohm	= 1451 },
+	{ .temp_c	= 90, .ohm	= 1266 },
+	{ .temp_c	= 95, .ohm	= 1108 },
+	{ .temp_c	= 100, .ohm	= 973 },
+	{ .temp_c	= 105, .ohm	= 857 },
+	{ .temp_c	= 110, .ohm	= 757 },
+	{ .temp_c	= 115, .ohm	= 671 },
+	{ .temp_c	= 120, .ohm	= 596 },
+	{ .temp_c	= 125, .ohm	= 531 },
+};
+
 struct ntc_data {
 	struct device *hwmon_dev;
 	struct ntc_thermistor_platform_data *pdata;
@@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
 		.data = &ntc_thermistor_id[3] },
 	{ .compatible = "murata,ncp15wl333",
 		.data = &ntc_thermistor_id[4] },
+	{ .compatible = "epcos,b57330v2103",
+		.data = &ntc_thermistor_id[5]},
 
 	/* Usage of vendor name "ntc" is deprecated */
 	{ .compatible = "ntc,ncp15wb473",
@@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
 		data->comp = ncpXXwl333;
 		data->n_comp = ARRAY_SIZE(ncpXXwl333);
 		break;
+	case TYPE_B57330V2103:
+		data->comp = b57330v2103;
+		data->n_comp = ARRAY_SIZE(b57330v2103);
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
 				pdev_id->driver_data, pdev_id->name);
@@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
 
 module_platform_driver(ntc_thermistor_driver);
 
-MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
+MODULE_DESCRIPTION("NTC Thermistor Driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
index c7285b5..0a6de4c 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -26,6 +26,7 @@ struct iio_channel;
 enum ntc_thermistor_type {
 	TYPE_NCPXXWB473,
 	TYPE_NCPXXWL333,
+	TYPE_B57330V2103,
 };
 
 struct ntc_thermistor_platform_data {
-- 
2.0.1

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: PATCH 2/2 v2] Adds support for the ntc thermistor B57330V2103 from  EPCOS
  2014-07-01  6:05       ` [lm-sensors] " Johannes Pointner
  (?)
@ 2014-07-01 13:50         ` Guenter Roeck
  -1 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-07-01 13:50 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi, lm-sensors, linux-iio,
	devicetree

On Tue, Jul 01, 2014 at 08:05:52AM +0200, Johannes Pointner wrote:
> This patch adds support for the ntc thermistor B57330V2103 from EPCOS.
> 
> Change since v1:
> 1. Rearranged compatible node values alphabetically
> 2. Fixed wrapped line
> 
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>

Copying the devicetree mailing list.

Looks ok to me, though I'll wait a bit to see if there is feedback
on this or the addition of epcos to the list of manufacturers from
the devicetree group. Unless there is negative feedback, I'll queue
it up for 3.17.

Thanks,
Guenter

> ---
>  .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
>  Documentation/hwmon/ntc_thermistor                 |  5 +++
>  drivers/hwmon/Kconfig                              |  2 +-
>  drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
>  include/linux/platform_data/ntc_thermistor.h       |  1 +
>  5 files changed, 57 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> index b117b2e..2391e5c 100644
> --- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> @@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
>  
>  Requires node properties:
>  - "compatible" value : one of
> +	"epcos,b57330v2103"
>  	"murata,ncp15wb473"
>  	"murata,ncp18wb473"
>  	"murata,ncp21wb473"
> diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
> index 057b770..c5e05e2 100644
> --- a/Documentation/hwmon/ntc_thermistor
> +++ b/Documentation/hwmon/ntc_thermistor
> @@ -6,6 +6,11 @@ Supported thermistors from Murata:
>    Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
>    Datasheet: Publicly available at Murata
>  
> +Supported thermistors from EPCOS:
> +* EPCOS NTC Thermistors B57330V2103
> +  Prefixes: b57330v2103
> +  Datasheet: Publicly available at EPCOS
> +
>  Other NTC thermistors can be supported simply by adding compensation
>  tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
>  
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 02d3d85..b34d673 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
>  
>  	  Currently, this driver supports
>  	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
> -	  from Murata.
> +	  from Murata and B57330V2103 from EPCOS.
>  
>  	  This driver can also be built as a module.  If so, the module
>  	  will be called ntc-thermistor.
> diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
> index bdfbe91..25c8deb 100644
> --- a/drivers/hwmon/ntc_thermistor.c
> +++ b/drivers/hwmon/ntc_thermistor.c
> @@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
>  	{ "ncp21wb473", TYPE_NCPXXWB473 },
>  	{ "ncp03wb473", TYPE_NCPXXWB473 },
>  	{ "ncp15wl333", TYPE_NCPXXWL333 },
> +	{ "b57330v2103", TYPE_B57330V2103},
>  	{ },
>  };
>  
> @@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
>  	{ .temp_c	= 125, .ohm	= 707 },
>  };
>  
> +/*
> + * The following compensation table is from the specification of EPCOS NTC
> + * Thermistors Datasheet
> + */
> +static const struct ntc_compensation b57330v2103[] = {
> +	{ .temp_c	= -40, .ohm	= 190030 },
> +	{ .temp_c	= -35, .ohm	= 145360 },
> +	{ .temp_c	= -30, .ohm	= 112060 },
> +	{ .temp_c	= -25, .ohm	= 87041 },
> +	{ .temp_c	= -20, .ohm	= 68104 },
> +	{ .temp_c	= -15, .ohm	= 53665 },
> +	{ .temp_c	= -10, .ohm	= 42576 },
> +	{ .temp_c	= -5, .ohm	= 34001 },
> +	{ .temp_c	= 0, .ohm	= 27326 },
> +	{ .temp_c	= 5, .ohm	= 22096 },
> +	{ .temp_c	= 10, .ohm	= 17973 },
> +	{ .temp_c	= 15, .ohm	= 14703 },
> +	{ .temp_c	= 20, .ohm	= 12090 },
> +	{ .temp_c	= 25, .ohm	= 10000 },
> +	{ .temp_c	= 30, .ohm	= 8311 },
> +	{ .temp_c	= 35, .ohm	= 6941 },
> +	{ .temp_c	= 40, .ohm	= 5825 },
> +	{ .temp_c	= 45, .ohm	= 4911 },
> +	{ .temp_c	= 50, .ohm	= 4158 },
> +	{ .temp_c	= 55, .ohm	= 3536 },
> +	{ .temp_c	= 60, .ohm	= 3019 },
> +	{ .temp_c	= 65, .ohm	= 2588 },
> +	{ .temp_c	= 70, .ohm	= 2227 },
> +	{ .temp_c	= 75, .ohm	= 1924 },
> +	{ .temp_c	= 80, .ohm	= 1668 },
> +	{ .temp_c	= 85, .ohm	= 1451 },
> +	{ .temp_c	= 90, .ohm	= 1266 },
> +	{ .temp_c	= 95, .ohm	= 1108 },
> +	{ .temp_c	= 100, .ohm	= 973 },
> +	{ .temp_c	= 105, .ohm	= 857 },
> +	{ .temp_c	= 110, .ohm	= 757 },
> +	{ .temp_c	= 115, .ohm	= 671 },
> +	{ .temp_c	= 120, .ohm	= 596 },
> +	{ .temp_c	= 125, .ohm	= 531 },
> +};
> +
>  struct ntc_data {
>  	struct device *hwmon_dev;
>  	struct ntc_thermistor_platform_data *pdata;
> @@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
>  		.data = &ntc_thermistor_id[3] },
>  	{ .compatible = "murata,ncp15wl333",
>  		.data = &ntc_thermistor_id[4] },
> +	{ .compatible = "epcos,b57330v2103",
> +		.data = &ntc_thermistor_id[5]},
>  
>  	/* Usage of vendor name "ntc" is deprecated */
>  	{ .compatible = "ntc,ncp15wb473",
> @@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
>  		data->comp = ncpXXwl333;
>  		data->n_comp = ARRAY_SIZE(ncpXXwl333);
>  		break;
> +	case TYPE_B57330V2103:
> +		data->comp = b57330v2103;
> +		data->n_comp = ARRAY_SIZE(b57330v2103);
> +		break;
>  	default:
>  		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
>  				pdev_id->driver_data, pdev_id->name);
> @@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
>  
>  module_platform_driver(ntc_thermistor_driver);
>  
> -MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
> +MODULE_DESCRIPTION("NTC Thermistor Driver");
>  MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
>  MODULE_LICENSE("GPL");
>  MODULE_ALIAS("platform:ntc-thermistor");
> diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
> index c7285b5..0a6de4c 100644
> --- a/include/linux/platform_data/ntc_thermistor.h
> +++ b/include/linux/platform_data/ntc_thermistor.h
> @@ -26,6 +26,7 @@ struct iio_channel;
>  enum ntc_thermistor_type {
>  	TYPE_NCPXXWB473,
>  	TYPE_NCPXXWL333,
> +	TYPE_B57330V2103,
>  };
>  
>  struct ntc_thermistor_platform_data {
> -- 
> 2.0.1
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [lm-sensors] PATCH 2/2 v2] Adds support for the ntc thermistor B57330V2103 from EPCOS
@ 2014-07-01 13:50         ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-07-01 13:50 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Jul 01, 2014 at 08:05:52AM +0200, Johannes Pointner wrote:
> This patch adds support for the ntc thermistor B57330V2103 from EPCOS.
> 
> Change since v1:
> 1. Rearranged compatible node values alphabetically
> 2. Fixed wrapped line
> 
> Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>

Copying the devicetree mailing list.

Looks ok to me, though I'll wait a bit to see if there is feedback
on this or the addition of epcos to the list of manufacturers from
the devicetree group. Unless there is negative feedback, I'll queue
it up for 3.17.

Thanks,
Guenter

> ---
>  .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
>  Documentation/hwmon/ntc_thermistor                 |  5 +++
>  drivers/hwmon/Kconfig                              |  2 +-
>  drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
>  include/linux/platform_data/ntc_thermistor.h       |  1 +
>  5 files changed, 57 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> index b117b2e..2391e5c 100644
> --- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> @@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
>  
>  Requires node properties:
>  - "compatible" value : one of
> +	"epcos,b57330v2103"
>  	"murata,ncp15wb473"
>  	"murata,ncp18wb473"
>  	"murata,ncp21wb473"
> diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
> index 057b770..c5e05e2 100644
> --- a/Documentation/hwmon/ntc_thermistor
> +++ b/Documentation/hwmon/ntc_thermistor
> @@ -6,6 +6,11 @@ Supported thermistors from Murata:
>    Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
>    Datasheet: Publicly available at Murata
>  
> +Supported thermistors from EPCOS:
> +* EPCOS NTC Thermistors B57330V2103
> +  Prefixes: b57330v2103
> +  Datasheet: Publicly available at EPCOS
> +
>  Other NTC thermistors can be supported simply by adding compensation
>  tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
>  
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 02d3d85..b34d673 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
>  
>  	  Currently, this driver supports
>  	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
> -	  from Murata.
> +	  from Murata and B57330V2103 from EPCOS.
>  
>  	  This driver can also be built as a module.  If so, the module
>  	  will be called ntc-thermistor.
> diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
> index bdfbe91..25c8deb 100644
> --- a/drivers/hwmon/ntc_thermistor.c
> +++ b/drivers/hwmon/ntc_thermistor.c
> @@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
>  	{ "ncp21wb473", TYPE_NCPXXWB473 },
>  	{ "ncp03wb473", TYPE_NCPXXWB473 },
>  	{ "ncp15wl333", TYPE_NCPXXWL333 },
> +	{ "b57330v2103", TYPE_B57330V2103},
>  	{ },
>  };
>  
> @@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
>  	{ .temp_c	= 125, .ohm	= 707 },
>  };
>  
> +/*
> + * The following compensation table is from the specification of EPCOS NTC
> + * Thermistors Datasheet
> + */
> +static const struct ntc_compensation b57330v2103[] = {
> +	{ .temp_c	= -40, .ohm	= 190030 },
> +	{ .temp_c	= -35, .ohm	= 145360 },
> +	{ .temp_c	= -30, .ohm	= 112060 },
> +	{ .temp_c	= -25, .ohm	= 87041 },
> +	{ .temp_c	= -20, .ohm	= 68104 },
> +	{ .temp_c	= -15, .ohm	= 53665 },
> +	{ .temp_c	= -10, .ohm	= 42576 },
> +	{ .temp_c	= -5, .ohm	= 34001 },
> +	{ .temp_c	= 0, .ohm	= 27326 },
> +	{ .temp_c	= 5, .ohm	= 22096 },
> +	{ .temp_c	= 10, .ohm	= 17973 },
> +	{ .temp_c	= 15, .ohm	= 14703 },
> +	{ .temp_c	= 20, .ohm	= 12090 },
> +	{ .temp_c	= 25, .ohm	= 10000 },
> +	{ .temp_c	= 30, .ohm	= 8311 },
> +	{ .temp_c	= 35, .ohm	= 6941 },
> +	{ .temp_c	= 40, .ohm	= 5825 },
> +	{ .temp_c	= 45, .ohm	= 4911 },
> +	{ .temp_c	= 50, .ohm	= 4158 },
> +	{ .temp_c	= 55, .ohm	= 3536 },
> +	{ .temp_c	= 60, .ohm	= 3019 },
> +	{ .temp_c	= 65, .ohm	= 2588 },
> +	{ .temp_c	= 70, .ohm	= 2227 },
> +	{ .temp_c	= 75, .ohm	= 1924 },
> +	{ .temp_c	= 80, .ohm	= 1668 },
> +	{ .temp_c	= 85, .ohm	= 1451 },
> +	{ .temp_c	= 90, .ohm	= 1266 },
> +	{ .temp_c	= 95, .ohm	= 1108 },
> +	{ .temp_c	= 100, .ohm	= 973 },
> +	{ .temp_c	= 105, .ohm	= 857 },
> +	{ .temp_c	= 110, .ohm	= 757 },
> +	{ .temp_c	= 115, .ohm	= 671 },
> +	{ .temp_c	= 120, .ohm	= 596 },
> +	{ .temp_c	= 125, .ohm	= 531 },
> +};
> +
>  struct ntc_data {
>  	struct device *hwmon_dev;
>  	struct ntc_thermistor_platform_data *pdata;
> @@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
>  		.data = &ntc_thermistor_id[3] },
>  	{ .compatible = "murata,ncp15wl333",
>  		.data = &ntc_thermistor_id[4] },
> +	{ .compatible = "epcos,b57330v2103",
> +		.data = &ntc_thermistor_id[5]},
>  
>  	/* Usage of vendor name "ntc" is deprecated */
>  	{ .compatible = "ntc,ncp15wb473",
> @@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
>  		data->comp = ncpXXwl333;
>  		data->n_comp = ARRAY_SIZE(ncpXXwl333);
>  		break;
> +	case TYPE_B57330V2103:
> +		data->comp = b57330v2103;
> +		data->n_comp = ARRAY_SIZE(b57330v2103);
> +		break;
>  	default:
>  		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
>  				pdev_id->driver_data, pdev_id->name);
> @@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
>  
>  module_platform_driver(ntc_thermistor_driver);
>  
> -MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
> +MODULE_DESCRIPTION("NTC Thermistor Driver");
>  MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
>  MODULE_LICENSE("GPL");
>  MODULE_ALIAS("platform:ntc-thermistor");
> diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
> index c7285b5..0a6de4c 100644
> --- a/include/linux/platform_data/ntc_thermistor.h
> +++ b/include/linux/platform_data/ntc_thermistor.h
> @@ -26,6 +26,7 @@ struct iio_channel;
>  enum ntc_thermistor_type {
>  	TYPE_NCPXXWB473,
>  	TYPE_NCPXXWL333,
> +	TYPE_B57330V2103,
>  };
>  
>  struct ntc_thermistor_platform_data {
> -- 
> 2.0.1
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: PATCH 2/2 v2] Adds support for the ntc thermistor B57330V2103 from  EPCOS
@ 2014-07-01 13:50         ` Guenter Roeck
  0 siblings, 0 replies; 20+ messages in thread
From: Guenter Roeck @ 2014-07-01 13:50 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Jean Delvare, Naveen Krishna Chatradhi,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Jul 01, 2014 at 08:05:52AM +0200, Johannes Pointner wrote:
> This patch adds support for the ntc thermistor B57330V2103 from EPCOS.
> 
> Change since v1:
> 1. Rearranged compatible node values alphabetically
> 2. Fixed wrapped line
> 
> Signed-off-by: Johannes Pointner <johannes.pointner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Copying the devicetree mailing list.

Looks ok to me, though I'll wait a bit to see if there is feedback
on this or the addition of epcos to the list of manufacturers from
the devicetree group. Unless there is negative feedback, I'll queue
it up for 3.17.

Thanks,
Guenter

> ---
>  .../devicetree/bindings/hwmon/ntc_thermistor.txt   |  1 +
>  Documentation/hwmon/ntc_thermistor                 |  5 +++
>  drivers/hwmon/Kconfig                              |  2 +-
>  drivers/hwmon/ntc_thermistor.c                     | 50 +++++++++++++++++++++-
>  include/linux/platform_data/ntc_thermistor.h       |  1 +
>  5 files changed, 57 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> index b117b2e..2391e5c 100644
> --- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> +++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
> @@ -3,6 +3,7 @@ NTC Thermistor hwmon sensors
>  
>  Requires node properties:
>  - "compatible" value : one of
> +	"epcos,b57330v2103"
>  	"murata,ncp15wb473"
>  	"murata,ncp18wb473"
>  	"murata,ncp21wb473"
> diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
> index 057b770..c5e05e2 100644
> --- a/Documentation/hwmon/ntc_thermistor
> +++ b/Documentation/hwmon/ntc_thermistor
> @@ -6,6 +6,11 @@ Supported thermistors from Murata:
>    Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
>    Datasheet: Publicly available at Murata
>  
> +Supported thermistors from EPCOS:
> +* EPCOS NTC Thermistors B57330V2103
> +  Prefixes: b57330v2103
> +  Datasheet: Publicly available at EPCOS
> +
>  Other NTC thermistors can be supported simply by adding compensation
>  tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
>  
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 02d3d85..b34d673 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1061,7 +1061,7 @@ config SENSORS_NTC_THERMISTOR
>  
>  	  Currently, this driver supports
>  	  NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
> -	  from Murata.
> +	  from Murata and B57330V2103 from EPCOS.
>  
>  	  This driver can also be built as a module.  If so, the module
>  	  will be called ntc-thermistor.
> diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
> index bdfbe91..25c8deb 100644
> --- a/drivers/hwmon/ntc_thermistor.c
> +++ b/drivers/hwmon/ntc_thermistor.c
> @@ -51,6 +51,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
>  	{ "ncp21wb473", TYPE_NCPXXWB473 },
>  	{ "ncp03wb473", TYPE_NCPXXWB473 },
>  	{ "ncp15wl333", TYPE_NCPXXWL333 },
> +	{ "b57330v2103", TYPE_B57330V2103},
>  	{ },
>  };
>  
> @@ -133,6 +134,47 @@ static const struct ntc_compensation ncpXXwl333[] = {
>  	{ .temp_c	= 125, .ohm	= 707 },
>  };
>  
> +/*
> + * The following compensation table is from the specification of EPCOS NTC
> + * Thermistors Datasheet
> + */
> +static const struct ntc_compensation b57330v2103[] = {
> +	{ .temp_c	= -40, .ohm	= 190030 },
> +	{ .temp_c	= -35, .ohm	= 145360 },
> +	{ .temp_c	= -30, .ohm	= 112060 },
> +	{ .temp_c	= -25, .ohm	= 87041 },
> +	{ .temp_c	= -20, .ohm	= 68104 },
> +	{ .temp_c	= -15, .ohm	= 53665 },
> +	{ .temp_c	= -10, .ohm	= 42576 },
> +	{ .temp_c	= -5, .ohm	= 34001 },
> +	{ .temp_c	= 0, .ohm	= 27326 },
> +	{ .temp_c	= 5, .ohm	= 22096 },
> +	{ .temp_c	= 10, .ohm	= 17973 },
> +	{ .temp_c	= 15, .ohm	= 14703 },
> +	{ .temp_c	= 20, .ohm	= 12090 },
> +	{ .temp_c	= 25, .ohm	= 10000 },
> +	{ .temp_c	= 30, .ohm	= 8311 },
> +	{ .temp_c	= 35, .ohm	= 6941 },
> +	{ .temp_c	= 40, .ohm	= 5825 },
> +	{ .temp_c	= 45, .ohm	= 4911 },
> +	{ .temp_c	= 50, .ohm	= 4158 },
> +	{ .temp_c	= 55, .ohm	= 3536 },
> +	{ .temp_c	= 60, .ohm	= 3019 },
> +	{ .temp_c	= 65, .ohm	= 2588 },
> +	{ .temp_c	= 70, .ohm	= 2227 },
> +	{ .temp_c	= 75, .ohm	= 1924 },
> +	{ .temp_c	= 80, .ohm	= 1668 },
> +	{ .temp_c	= 85, .ohm	= 1451 },
> +	{ .temp_c	= 90, .ohm	= 1266 },
> +	{ .temp_c	= 95, .ohm	= 1108 },
> +	{ .temp_c	= 100, .ohm	= 973 },
> +	{ .temp_c	= 105, .ohm	= 857 },
> +	{ .temp_c	= 110, .ohm	= 757 },
> +	{ .temp_c	= 115, .ohm	= 671 },
> +	{ .temp_c	= 120, .ohm	= 596 },
> +	{ .temp_c	= 125, .ohm	= 531 },
> +};
> +
>  struct ntc_data {
>  	struct device *hwmon_dev;
>  	struct ntc_thermistor_platform_data *pdata;
> @@ -173,6 +215,8 @@ static const struct of_device_id ntc_match[] = {
>  		.data = &ntc_thermistor_id[3] },
>  	{ .compatible = "murata,ncp15wl333",
>  		.data = &ntc_thermistor_id[4] },
> +	{ .compatible = "epcos,b57330v2103",
> +		.data = &ntc_thermistor_id[5]},
>  
>  	/* Usage of vendor name "ntc" is deprecated */
>  	{ .compatible = "ntc,ncp15wb473",
> @@ -490,6 +534,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
>  		data->comp = ncpXXwl333;
>  		data->n_comp = ARRAY_SIZE(ncpXXwl333);
>  		break;
> +	case TYPE_B57330V2103:
> +		data->comp = b57330v2103;
> +		data->n_comp = ARRAY_SIZE(b57330v2103);
> +		break;
>  	default:
>  		dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n",
>  				pdev_id->driver_data, pdev_id->name);
> @@ -546,7 +594,7 @@ static struct platform_driver ntc_thermistor_driver = {
>  
>  module_platform_driver(ntc_thermistor_driver);
>  
> -MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
> +MODULE_DESCRIPTION("NTC Thermistor Driver");
>  MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>");
>  MODULE_LICENSE("GPL");
>  MODULE_ALIAS("platform:ntc-thermistor");
> diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
> index c7285b5..0a6de4c 100644
> --- a/include/linux/platform_data/ntc_thermistor.h
> +++ b/include/linux/platform_data/ntc_thermistor.h
> @@ -26,6 +26,7 @@ struct iio_channel;
>  enum ntc_thermistor_type {
>  	TYPE_NCPXXWB473,
>  	TYPE_NCPXXWL333,
> +	TYPE_B57330V2103,
>  };
>  
>  struct ntc_thermistor_platform_data {
> -- 
> 2.0.1
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-07-01 13:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-27 12:59 [PATCH 0/2] hwmon: ntc_thermistor: Adds support for EPCOS ntc thermistor Johannes Pointner
2014-06-27 12:59 ` [lm-sensors] " Johannes Pointner
2014-06-27 14:28 ` Guenter Roeck
2014-06-27 14:28   ` [lm-sensors] " Guenter Roeck
2014-06-27 17:50   ` Johannes Pointner
2014-06-27 17:50     ` [lm-sensors] " Johannes Pointner
2014-06-27 17:53   ` [PATCH 1/2] Adds the vendor prefix "epcos" to vendor-prefixes.txt Johannes Pointner
2014-06-27 17:53     ` [lm-sensors] " Johannes Pointner
2014-06-29 19:45     ` Guenter Roeck
2014-06-29 19:45       ` Guenter Roeck
2014-06-29 19:45       ` [lm-sensors] " Guenter Roeck
2014-06-27 18:01   ` [PATCH 2/2] Adds support for the ntc thermistor B57330V2103 from EPCOS Johannes Pointner
2014-06-27 18:01     ` [lm-sensors] " Johannes Pointner
2014-06-29 19:53     ` Guenter Roeck
2014-06-29 19:53       ` [lm-sensors] " Guenter Roeck
2014-07-01  6:05     ` PATCH 2/2 v2] " Johannes Pointner
2014-07-01  6:05       ` [lm-sensors] " Johannes Pointner
2014-07-01 13:50       ` Guenter Roeck
2014-07-01 13:50         ` Guenter Roeck
2014-07-01 13:50         ` [lm-sensors] " Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.