Skip to content

Commit c851b71

Browse files
peda-rgroeck
authored andcommitted
hwmon: (lm75) Add Atmel AT30TS74 support
Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it. Signed-off-by: Peter Rosin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent be75409 commit c851b71

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/hwmon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,7 @@ config SENSORS_LM75
12521252
temperature sensor chip, with models including:
12531253

12541254
- Analog Devices ADT75
1255+
- Atmel (now Microchip) AT30TS74
12551256
- Dallas Semiconductor DS75, DS1775 and DS7505
12561257
- Global Mixed-mode Technology (GMT) G751
12571258
- Maxim MAX6625 and MAX6626

drivers/hwmon/lm75.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
enum lm75_type { /* keep sorted in alphabetical order */
2828
adt75,
29+
at30ts74,
2930
ds1775,
3031
ds75,
3132
ds7505,
@@ -128,6 +129,14 @@ static const struct lm75_params device_params[] = {
128129
.default_resolution = 12,
129130
.default_sample_time = MSEC_PER_SEC / 10,
130131
},
132+
[at30ts74] = {
133+
.set_mask = 3 << 5, /* 12-bit mode*/
134+
.default_resolution = 12,
135+
.default_sample_time = 200,
136+
.num_sample_times = 4,
137+
.sample_times = (unsigned int []){ 25, 50, 100, 200 },
138+
.resolutions = (u8 []) {9, 10, 11, 12 },
139+
},
131140
[ds1775] = {
132141
.clr_mask = 3 << 5,
133142
.set_mask = 2 << 5, /* 11-bit mode */
@@ -645,6 +654,7 @@ static int lm75_probe(struct i2c_client *client)
645654

646655
static const struct i2c_device_id lm75_ids[] = {
647656
{ "adt75", adt75, },
657+
{ "at30ts74", at30ts74, },
648658
{ "ds1775", ds1775, },
649659
{ "ds75", ds75, },
650660
{ "ds7505", ds7505, },
@@ -680,6 +690,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
680690
.compatible = "adi,adt75",
681691
.data = (void *)adt75
682692
},
693+
{
694+
.compatible = "atmel,at30ts74",
695+
.data = (void *)at30ts74
696+
},
683697
{
684698
.compatible = "dallas,ds1775",
685699
.data = (void *)ds1775

0 commit comments

Comments
 (0)