Skip to content

Commit f3261df

Browse files
Raphael Assenatgregkh
authored andcommitted
1-Wire: Add support for the maxim ds1825 temperature sensor
This patch adds support for maxim ds1825 based 1-wire temperature sensors. Signed-off-by: Raphael Assenat <raph@8d.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f3d9d36 commit f3261df

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎Documentation/w1/slaves/w1_therm‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Kernel driver w1_therm
33

44
Supported chips:
55
* Maxim ds18*20 based temperature sensors.
6+
* Maxim ds1825 based temperature sensors.
67

78
Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
89

@@ -15,6 +16,7 @@ supported family codes:
1516
W1_THERM_DS18S20 0x10
1617
W1_THERM_DS1822 0x22
1718
W1_THERM_DS18B20 0x28
19+
W1_THERM_DS1825 0x3B
1820

1921
Support is provided through the sysfs w1_slave file. Each open and
2022
read sequence will initiate a temperature conversion then provide two

‎drivers/w1/slaves/w1_therm.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ static struct w1_family w1_therm_family_DS28EA00 = {
9191
.fops = &w1_therm_fops,
9292
};
9393

94+
static struct w1_family w1_therm_family_DS1825 = {
95+
.fid = W1_THERM_DS1825,
96+
.fops = &w1_therm_fops,
97+
};
98+
9499
struct w1_therm_family_converter
95100
{
96101
u8 broken;
@@ -120,6 +125,10 @@ static struct w1_therm_family_converter w1_therm_families[] = {
120125
.f = &w1_therm_family_DS28EA00,
121126
.convert = w1_DS18B20_convert_temp
122127
},
128+
{
129+
.f = &w1_therm_family_DS1825,
130+
.convert = w1_DS18B20_convert_temp
131+
}
123132
};
124133

125134
static inline int w1_DS18B20_convert_temp(u8 rom[9])

‎drivers/w1/w1_family.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#define W1_EEPROM_DS2431 0x2D
4040
#define W1_FAMILY_DS2760 0x30
4141
#define W1_FAMILY_DS2780 0x32
42+
#define W1_THERM_DS1825 0x3B
4243
#define W1_FAMILY_DS2781 0x3D
4344
#define W1_THERM_DS28EA00 0x42
4445

0 commit comments

Comments
 (0)