diff options
author | Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk> | 2019-05-03 18:15:00 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-05-03 22:16:18 +0200 |
commit | 39abe9d88b30a51029b0b29a708a4f4459034565 (patch) | |
tree | e50009f761b3b5d82ab7a12b1edc67dff7257cac /drivers/hwmon | |
parent | dt-bindings: hwmon: Add tmp75b to lm75.txt (diff) | |
download | linux-39abe9d88b30a51029b0b29a708a4f4459034565.tar.xz linux-39abe9d88b30a51029b0b29a708a4f4459034565.zip |
hwmon: (lm75) Add support for TMP75B
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lm75.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index f307743edc25..423a382420b9 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -59,6 +59,7 @@ enum lm75_type { /* keep sorted in alphabetical order */ tmp175, tmp275, tmp75, + tmp75b, tmp75c, }; @@ -354,6 +355,11 @@ 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: /* not one-shot mode, Conversion rate 37Hz */ + clr_mask |= 1 << 15 | 0x3 << 13; + data->resolution = 12; + data->sample_time = MSEC_PER_SEC / 37; + break; case tmp75c: clr_mask |= 1 << 5; /* not one-shot mode */ data->resolution = 12; @@ -414,6 +420,7 @@ static const struct i2c_device_id lm75_ids[] = { { "tmp175", tmp175, }, { "tmp275", tmp275, }, { "tmp75", tmp75, }, + { "tmp75b", tmp75b, }, { "tmp75c", tmp75c, }, { /* LIST END */ } }; @@ -513,6 +520,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = { .data = (void *)tmp75 }, { + .compatible = "ti,tmp75b", + .data = (void *)tmp75b + }, + { .compatible = "ti,tmp75c", .data = (void *)tmp75c }, |