hwmon: (lm75) Add support for the Dallas/Maxim DS7505
authorJean Delvare <khali@linux-fr.org>
Sat, 4 May 2013 12:49:36 +0000 (14:49 +0200)
committerJean Delvare <khali@endymion.delvare>
Sat, 4 May 2013 12:49:36 +0000 (14:49 +0200)
Basically it's the same as the original DS75 but much faster.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/lm75
drivers/hwmon/Kconfig
drivers/hwmon/lm75.c

index 5e45d0795986097583157ee22bfbbad0c4195a35..2560a9c6d4453ba2ceeb3e3f34c107551cf1f6f6 100644 (file)
@@ -12,11 +12,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 - 0x4f
     Datasheet: Publicly available at the National Semiconductor website
                http://www.national.com/
-  * Dallas Semiconductor DS75, DS1775
-    Prefixes: 'ds75', 'ds1775'
+  * Dallas Semiconductor (now Maxim) DS75, DS1775, DS7505
+    Prefixes: 'ds75', 'ds1775', 'ds7505'
     Addresses scanned: none
-    Datasheet: Publicly available at the Dallas Semiconductor website
-               http://www.maxim-ic.com/
+    Datasheet: Publicly available at the Maxim website
+               http://www.maximintegrated.com/
   * Maxim MAX6625, MAX6626
     Prefixes: 'max6625', 'max6626'
     Addresses scanned: none
index 9c333d47143301291840441bdbc8fec57749d02a..0428e8a74b19253c1ab5da323d9026fe3e9a23c7 100644 (file)
@@ -630,7 +630,7 @@ config SENSORS_LM75
          temperature sensor chip, with models including:
 
                - Analog Devices ADT75
-               - Dallas Semiconductor DS75 and DS1775
+               - Dallas Semiconductor DS75, DS1775 and DS7505
                - Maxim MAX6625 and MAX6626
                - Microchip MCP980x
                - National Semiconductor LM75, LM75A
index 9283411157931a5f3b0cd925de77a9fa2cec5d48..c03b490bba813287d1d6368338743b450f34e687 100644 (file)
@@ -38,6 +38,7 @@ enum lm75_type {              /* keep sorted in alphabetical order */
        adt75,
        ds1775,
        ds75,
+       ds7505,
        lm75,
        lm75a,
        max6625,
@@ -202,6 +203,11 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
                data->resolution = 11;
                data->sample_time = HZ;
                break;
+       case ds7505:
+               set_mask |= 3 << 5;             /* 12-bit mode */
+               data->resolution = 12;
+               data->sample_time = HZ / 4;
+               break;
        case lm75:
        case lm75a:
                data->resolution = 9;
@@ -289,6 +295,7 @@ static const struct i2c_device_id lm75_ids[] = {
        { "adt75", adt75, },
        { "ds1775", ds1775, },
        { "ds75", ds75, },
+       { "ds7505", ds7505, },
        { "lm75", lm75, },
        { "lm75a", lm75a, },
        { "max6625", max6625, },