Commit f3261dfb authored by Raphael Assenat's avatar Raphael Assenat Committed by Greg Kroah-Hartman

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: default avatarRaphael Assenat <raph@8d.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f3d9d365
...@@ -3,6 +3,7 @@ Kernel driver w1_therm ...@@ -3,6 +3,7 @@ Kernel driver w1_therm
Supported chips: Supported chips:
* Maxim ds18*20 based temperature sensors. * Maxim ds18*20 based temperature sensors.
* Maxim ds1825 based temperature sensors.
Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
...@@ -15,6 +16,7 @@ supported family codes: ...@@ -15,6 +16,7 @@ supported family codes:
W1_THERM_DS18S20 0x10 W1_THERM_DS18S20 0x10
W1_THERM_DS1822 0x22 W1_THERM_DS1822 0x22
W1_THERM_DS18B20 0x28 W1_THERM_DS18B20 0x28
W1_THERM_DS1825 0x3B
Support is provided through the sysfs w1_slave file. Each open and Support is provided through the sysfs w1_slave file. Each open and
read sequence will initiate a temperature conversion then provide two read sequence will initiate a temperature conversion then provide two
......
...@@ -91,6 +91,11 @@ static struct w1_family w1_therm_family_DS28EA00 = { ...@@ -91,6 +91,11 @@ static struct w1_family w1_therm_family_DS28EA00 = {
.fops = &w1_therm_fops, .fops = &w1_therm_fops,
}; };
static struct w1_family w1_therm_family_DS1825 = {
.fid = W1_THERM_DS1825,
.fops = &w1_therm_fops,
};
struct w1_therm_family_converter struct w1_therm_family_converter
{ {
u8 broken; u8 broken;
...@@ -120,6 +125,10 @@ static struct w1_therm_family_converter w1_therm_families[] = { ...@@ -120,6 +125,10 @@ static struct w1_therm_family_converter w1_therm_families[] = {
.f = &w1_therm_family_DS28EA00, .f = &w1_therm_family_DS28EA00,
.convert = w1_DS18B20_convert_temp .convert = w1_DS18B20_convert_temp
}, },
{
.f = &w1_therm_family_DS1825,
.convert = w1_DS18B20_convert_temp
}
}; };
static inline int w1_DS18B20_convert_temp(u8 rom[9]) static inline int w1_DS18B20_convert_temp(u8 rom[9])
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#define W1_EEPROM_DS2431 0x2D #define W1_EEPROM_DS2431 0x2D
#define W1_FAMILY_DS2760 0x30 #define W1_FAMILY_DS2760 0x30
#define W1_FAMILY_DS2780 0x32 #define W1_FAMILY_DS2780 0x32
#define W1_THERM_DS1825 0x3B
#define W1_FAMILY_DS2781 0x3D #define W1_FAMILY_DS2781 0x3D
#define W1_THERM_DS28EA00 0x42 #define W1_THERM_DS28EA00 0x42
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment