From: Iker Perez del Palomar <iker.perez@codethink.co.uk>
To: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@roeck-us.net, jdelvare@suse.com
Subject: Fwd: [PATCH 1/2] hwmon: (lm75) Add support for TMP75B
Date: Tue, 23 Apr 2019 11:11:15 +0100 [thread overview]
Message-ID: <2effcb0e-03c6-0f7e-b154-62cbc9ad415a@codethink.co.uk> (raw)
In-Reply-To: <2904a750-c6e9-719b-7523-0f45e0bc82cc@codethink.co.uk>
The TMP75B has a different control register, supports 12-bit
resolution and the default conversion rate is 37 Hz.
Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
---
Documentation/hwmon/lm75 | 5 +++--
drivers/hwmon/lm75.c | 13 +++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index 010583608f12..baf052935761 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -47,8 +47,8 @@ Supported chips:
Addresses scanned: none
Datasheet: Publicly available at the ST website
https://www.st.com/resource/en/datasheet/stlm75.pdf
- * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP75C,
TMP175, TMP275
- Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175',
'tmp75', 'tmp75c', 'tmp275'
+ * Texas Instruments TMP100, TMP101, TMP105, TMP112, TMP75, TMP75B,
TMP75C, TMP175, TMP275
+ Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp112', 'tmp175',
'tmp75', 'tmp75b', 'tmp75c', 'tmp275'
Addresses scanned: none
Datasheet: Publicly available at the Texas Instruments website
http://www.ti.com/product/tmp100
@@ -56,6 +56,7 @@ Supported chips:
http://www.ti.com/product/tmp105
http://www.ti.com/product/tmp112
http://www.ti.com/product/tmp75
+ http://www.ti.com/product/tmp75b
http://www.ti.com/product/tmp75c
http://www.ti.com/product/tmp175
http://www.ti.com/product/tmp275
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 62acb9f16ec5..1b5c32cbdc62 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -32,6 +32,7 @@
#include "lm75.h"
+
/*
* This driver handles the LM75 and compatible digital temperature
sensors.
*/
@@ -59,6 +60,7 @@ enum lm75_type { /* keep sorted in alphabetical
order */
tmp175,
tmp275,
tmp75,
+ tmp75b,
tmp75c,
};
@@ -378,6 +380,12 @@ lm75_probe(struct i2c_client *client, const struct
i2c_device_id *id)
data->resolution = 12;
data->sample_time = MSEC_PER_SEC / 2;
break;
+ case tmp75b:
+ clr_mask |= 1 << 15; /* not one-shot mode */
+ data->resolution = 12;
+ data->sample_time = MSEC_PER_SEC / 32;
+ break;
+
case tmp75c:
clr_mask |= 1 << 5; /* not one-shot mode */
data->resolution = 12;
@@ -438,6 +446,7 @@ static const struct i2c_device_id lm75_ids[] = {
{ "tmp175", tmp175, },
{ "tmp275", tmp275, },
{ "tmp75", tmp75, },
+ { "tmp75b", tmp75b,},
{ "tmp75c", tmp75c, },
{ /* LIST END */ }
};
@@ -537,6 +546,10 @@ static const struct of_device_id lm75_of_match[] = {
.data = (void *)tmp75
},
{
+ .compatible = "ti,tmp75b",
+ .data = (void *)tmp75b
+ },
+ {
.compatible = "ti,tmp75c",
.data = (void *)tmp75c
},
--
2.11.0
--
Iker Perez del Palomar, Software Engineer
Codethink Ltd 35 Dale St, Manchester M1 2HF
http://www.codethink.co.uk/ Manchester, M1 2JW, United Kingdom
We respect your privacy. See https://www.codethink.co.uk/privacy.html
next parent reply other threads:[~2019-04-23 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2904a750-c6e9-719b-7523-0f45e0bc82cc@codethink.co.uk>
2019-04-23 10:11 ` Iker Perez del Palomar [this message]
2019-04-23 13:52 ` Fwd: [PATCH 1/2] hwmon: (lm75) Add support for TMP75B Guenter Roeck
2019-04-24 14:54 ` Iker Perez del Palomar
[not found] ` <e3d0b580-5552-fc4c-7ecc-660b000bfbc4@codethink.co.uk>
2019-04-24 17:37 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2effcb0e-03c6-0f7e-b154-62cbc9ad415a@codethink.co.uk \
--to=iker.perez@codethink.co.uk \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).