diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iio/pressure/st_pressure_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 9c343b40665e..3ffbc56917b4 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c | |||
| @@ -28,7 +28,9 @@ | |||
| 28 | #include <linux/iio/common/st_sensors.h> | 28 | #include <linux/iio/common/st_sensors.h> |
| 29 | #include "st_pressure.h" | 29 | #include "st_pressure.h" |
| 30 | 30 | ||
| 31 | #define ST_PRESS_MBAR_TO_KPASCAL(x) (x * 10) | 31 | #define ST_PRESS_LSB_PER_MBAR 4096UL |
| 32 | #define ST_PRESS_KPASCAL_NANO_SCALE (100000000UL / \ | ||
| 33 | ST_PRESS_LSB_PER_MBAR) | ||
| 32 | #define ST_PRESS_NUMBER_DATA_CHANNELS 1 | 34 | #define ST_PRESS_NUMBER_DATA_CHANNELS 1 |
| 33 | 35 | ||
| 34 | /* DEFAULT VALUE FOR SENSORS */ | 36 | /* DEFAULT VALUE FOR SENSORS */ |
| @@ -51,8 +53,8 @@ | |||
| 51 | #define ST_PRESS_1_FS_ADDR 0x23 | 53 | #define ST_PRESS_1_FS_ADDR 0x23 |
| 52 | #define ST_PRESS_1_FS_MASK 0x30 | 54 | #define ST_PRESS_1_FS_MASK 0x30 |
| 53 | #define ST_PRESS_1_FS_AVL_1260_VAL 0x00 | 55 | #define ST_PRESS_1_FS_AVL_1260_VAL 0x00 |
| 54 | #define ST_PRESS_1_FS_AVL_1260_GAIN ST_PRESS_MBAR_TO_KPASCAL(244141) | ||
| 55 | #define ST_PRESS_1_FS_AVL_TEMP_GAIN 2083000 | 56 | #define ST_PRESS_1_FS_AVL_TEMP_GAIN 2083000 |
| 57 | #define ST_PRESS_1_FS_AVL_1260_GAIN ST_PRESS_KPASCAL_NANO_SCALE | ||
| 56 | #define ST_PRESS_1_BDU_ADDR 0x20 | 58 | #define ST_PRESS_1_BDU_ADDR 0x20 |
| 57 | #define ST_PRESS_1_BDU_MASK 0x04 | 59 | #define ST_PRESS_1_BDU_MASK 0x04 |
| 58 | #define ST_PRESS_1_DRDY_IRQ_ADDR 0x22 | 60 | #define ST_PRESS_1_DRDY_IRQ_ADDR 0x22 |
