forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/iio/pressure/ms5611.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * MS5611 pressure and temperature sensor driver
34 *
45 * Copyright (c) Tomasz Duszynski <tduszyns@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 */
118
....@@ -28,13 +25,6 @@
2825 MS5607,
2926 };
3027
31
-struct ms5611_chip_info {
32
- u16 prom[MS5611_PROM_WORDS_NB];
33
-
34
- int (*temp_and_pressure_compensate)(struct ms5611_chip_info *chip_info,
35
- s32 *temp, s32 *pressure);
36
-};
37
-
3828 /*
3929 * OverSampling Rate descriptor.
4030 * Warning: cmd MUST be kept aligned on a word boundary (see
....@@ -53,12 +43,15 @@
5343 const struct ms5611_osr *pressure_osr;
5444 const struct ms5611_osr *temp_osr;
5545
56
- int (*reset)(struct device *dev);
57
- int (*read_prom_word)(struct device *dev, int index, u16 *word);
58
- int (*read_adc_temp_and_pressure)(struct device *dev,
46
+ u16 prom[MS5611_PROM_WORDS_NB];
47
+
48
+ int (*reset)(struct ms5611_state *st);
49
+ int (*read_prom_word)(struct ms5611_state *st, int index, u16 *word);
50
+ int (*read_adc_temp_and_pressure)(struct ms5611_state *st,
5951 s32 *temp, s32 *pressure);
6052
61
- struct ms5611_chip_info *chip_info;
53
+ int (*compensate_temp_and_pressure)(struct ms5611_state *st, s32 *temp,
54
+ s32 *pressure);
6255 struct regulator *vdd;
6356 };
6457