staging: iio: adt7316: fix register and bit definitions
authorJeremy Fertic <jeremyfertic@gmail.com>
Wed, 12 Dec 2018 00:54:53 +0000 (17:54 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Dec 2018 14:05:55 +0000 (14:05 +0000)
Change two register addresses and one bit definition to match the
datasheet.

Note that there are many issues in this driver so I would
not suggest backporting these fixes to stable trees.

Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/addac/adt7316.c

index dc93e85..1fa4a4c 100644 (file)
@@ -59,8 +59,8 @@
 #define ADT7316_CONFIG1                        0x18
 #define ADT7316_CONFIG2                        0x19
 #define ADT7316_CONFIG3                        0x1A
-#define ADT7316_LDAC_CONFIG            0x1B
-#define ADT7316_DAC_CONFIG             0x1C
+#define ADT7316_DAC_CONFIG             0x1B
+#define ADT7316_LDAC_CONFIG            0x1C
 #define ADT7316_INT_MASK1              0x1D
 #define ADT7316_INT_MASK2              0x1E
 #define ADT7316_IN_TEMP_OFFSET         0x1F
  */
 #define ADT7316_ADCLK_22_5             0x1
 #define ADT7316_DA_HIGH_RESOLUTION     0x2
-#define ADT7316_DA_EN_VIA_DAC_LDCA     0x4
+#define ADT7316_DA_EN_VIA_DAC_LDCA     0x8
 #define ADT7516_AIN_IN_VREF            0x10
 #define ADT7316_EN_IN_TEMP_PROP_DACA   0x20
 #define ADT7316_EN_EX_TEMP_PROP_DACB   0x40