summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2022-04-25 22:35:50 +0200
committerGuenter Roeck <linux@roeck-us.net>2022-05-20 19:57:05 +0200
commitc851b715d38de0c262a63de16ad954ed39b47aca (patch)
treee0718d3d8bd6f51f7d0b081eacfd660bf332813e /drivers/hwmon/lm75.c
parentdt-bindings: hwmon: Add Atmel AT30TS74 (diff)
downloadlinux-c851b715d38de0c262a63de16ad954ed39b47aca.tar.xz
linux-c851b715d38de0c262a63de16ad954ed39b47aca.zip
hwmon: (lm75) Add Atmel AT30TS74 support
Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it. Signed-off-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/9494dfbc-f506-3e94-501d-6760c487c93d@axentia.se Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index afdbb63237b9..66dc826f7962 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -26,6 +26,7 @@
enum lm75_type { /* keep sorted in alphabetical order */
adt75,
+ at30ts74,
ds1775,
ds75,
ds7505,
@@ -128,6 +129,14 @@ static const struct lm75_params device_params[] = {
.default_resolution = 12,
.default_sample_time = MSEC_PER_SEC / 10,
},
+ [at30ts74] = {
+ .set_mask = 3 << 5, /* 12-bit mode*/
+ .default_resolution = 12,
+ .default_sample_time = 200,
+ .num_sample_times = 4,
+ .sample_times = (unsigned int []){ 25, 50, 100, 200 },
+ .resolutions = (u8 []) {9, 10, 11, 12 },
+ },
[ds1775] = {
.clr_mask = 3 << 5,
.set_mask = 2 << 5, /* 11-bit mode */
@@ -645,6 +654,7 @@ static int lm75_probe(struct i2c_client *client)
static const struct i2c_device_id lm75_ids[] = {
{ "adt75", adt75, },
+ { "at30ts74", at30ts74, },
{ "ds1775", ds1775, },
{ "ds75", ds75, },
{ "ds7505", ds7505, },
@@ -681,6 +691,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
.data = (void *)adt75
},
{
+ .compatible = "atmel,at30ts74",
+ .data = (void *)at30ts74
+ },
+ {
.compatible = "dallas,ds1775",
.data = (void *)ds1775
},