From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbbD3DPA (ORCPT ); Wed, 29 Apr 2015 23:15:00 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:43101 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbbD3DO7 (ORCPT ); Wed, 29 Apr 2015 23:14:59 -0400 Message-ID: <55419DE1.5010205@roeck-us.net> Date: Wed, 29 Apr 2015 20:13:37 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Beomho Seo , jdelvare@suse.de CC: linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org, cw00.choi@samsung.com, inki.dae@samsung.com, sangbae90.lee@samsung.com Subject: Re: [lm-sensors][PATCH] hwmon: (ntc_thermistor) Add support for ncpXXwf104 References: <1430360739-22006-1-git-send-email-beomho.seo@samsung.com> In-Reply-To: <1430360739-22006-1-git-send-email-beomho.seo@samsung.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020205.55419E32.00A2,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 5 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/29/2015 07:25 PM, Beomho Seo wrote: > This patch adds support for the ntc thermistor NCPXXWF104 serise. > s/serise/series > Cc: Jean Delvare > Cc: Guenter Roeck > Signed-off-by: Beomho Seo > --- > drivers/hwmon/ntc_thermistor.c | 45 ++++++++++++++++++++++++++ > include/linux/platform_data/ntc_thermistor.h | 1 + Please also update Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt Documentation/hwmon/ntc_thermistor drivers/hwmon/Kconfig > 2 files changed, 46 insertions(+) > > diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c > index 112e4d4..a320664 100644 > --- a/drivers/hwmon/ntc_thermistor.c > +++ b/drivers/hwmon/ntc_thermistor.c > @@ -53,6 +53,7 @@ static const struct platform_device_id ntc_thermistor_id[] = { > { "ncp03wb473", TYPE_NCPXXWB473 }, > { "ncp15wl333", TYPE_NCPXXWL333 }, > { "b57330v2103", TYPE_B57330V2103}, > + { "ncp03wf104", TYPE_NCPXXWF104 }, > { }, > }; > > @@ -135,6 +136,43 @@ static const struct ntc_compensation ncpXXwl333[] = { > { .temp_c = 125, .ohm = 707 }, > }; > > +static const struct ntc_compensation ncpXXwf104[] = { > + { .temp_c = -40, .ohm = 4397119 }, > + { .temp_c = -35, .ohm = 3088599 }, > + { .temp_c = -30, .ohm = 2197225 }, > + { .temp_c = -25, .ohm = 1581881 }, > + { .temp_c = -20, .ohm = 1151037 }, > + { .temp_c = -15, .ohm = 846579 }, > + { .temp_c = -10, .ohm = 628988 }, > + { .temp_c = -5, .ohm = 471632 }, > + { .temp_c = 0, .ohm = 357012 }, > + { .temp_c = 5, .ohm = 272500 }, > + { .temp_c = 10, .ohm = 209710 }, > + { .temp_c = 15, .ohm = 162651 }, > + { .temp_c = 20, .ohm = 127080 }, > + { .temp_c = 25, .ohm = 100000 }, > + { .temp_c = 30, .ohm = 79222 }, > + { .temp_c = 35, .ohm = 63167 }, > + { .temp_c = 40, .ohm = 50677 }, > + { .temp_c = 45, .ohm = 40904 }, > + { .temp_c = 50, .ohm = 33195 }, > + { .temp_c = 55, .ohm = 27091 }, > + { .temp_c = 60, .ohm = 22224 }, > + { .temp_c = 65, .ohm = 18323 }, > + { .temp_c = 70, .ohm = 15184 }, > + { .temp_c = 75, .ohm = 12635 }, > + { .temp_c = 80, .ohm = 10566 }, > + { .temp_c = 85, .ohm = 8873 }, > + { .temp_c = 90, .ohm = 7481 }, > + { .temp_c = 95, .ohm = 6337 }, > + { .temp_c = 100, .ohm = 5384 }, > + { .temp_c = 105, .ohm = 4594 }, > + { .temp_c = 110, .ohm = 3934 }, > + { .temp_c = 115, .ohm = 3380 }, > + { .temp_c = 120, .ohm = 2916 }, > + { .temp_c = 125, .ohm = 2522 }, > +}; > + > /* > * The following compensation table is from the specification of EPCOS NTC > * Thermistors Datasheet > @@ -231,6 +269,9 @@ static const struct of_device_id ntc_match[] = { > .data = &ntc_thermistor_id[3] }, > { .compatible = "ntc,ncp15wl333", > .data = &ntc_thermistor_id[4] }, > + { .compatible = "ntc,ncp03wf104", Please use murata instead of ntc (see the devicetree bindings document), and add the entry to the murata list. > + .data = &ntc_thermistor_id[6] }, > + > { }, > }; > MODULE_DEVICE_TABLE(of, ntc_match); > @@ -558,6 +599,10 @@ static int ntc_thermistor_probe(struct platform_device *pdev) > data->comp = b57330v2103; > data->n_comp = ARRAY_SIZE(b57330v2103); > break; > + case TYPE_NCPXXWF104: > + data->comp = ncpXXwf104; > + data->n_comp = ARRAY_SIZE(ncpXXwf104); > + break; > default: > dev_err(&pdev->dev, "Unknown device type: %lu(%s)\n", > pdev_id->driver_data, pdev_id->name); > diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h > index 0a6de4c..aed1705 100644 > --- a/include/linux/platform_data/ntc_thermistor.h > +++ b/include/linux/platform_data/ntc_thermistor.h > @@ -27,6 +27,7 @@ enum ntc_thermistor_type { > TYPE_NCPXXWB473, > TYPE_NCPXXWL333, > TYPE_B57330V2103, > + TYPE_NCPXXWF104, > }; > > struct ntc_thermistor_platform_data { >