.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * MS5611 pressure and temperature sensor driver |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | * |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
.. | .. |
---|
28 | 25 | MS5607, |
---|
29 | 26 | }; |
---|
30 | 27 | |
---|
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 | | - |
---|
38 | 28 | /* |
---|
39 | 29 | * OverSampling Rate descriptor. |
---|
40 | 30 | * Warning: cmd MUST be kept aligned on a word boundary (see |
---|
.. | .. |
---|
53 | 43 | const struct ms5611_osr *pressure_osr; |
---|
54 | 44 | const struct ms5611_osr *temp_osr; |
---|
55 | 45 | |
---|
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, |
---|
59 | 51 | s32 *temp, s32 *pressure); |
---|
60 | 52 | |
---|
61 | | - struct ms5611_chip_info *chip_info; |
---|
| 53 | + int (*compensate_temp_and_pressure)(struct ms5611_state *st, s32 *temp, |
---|
| 54 | + s32 *pressure); |
---|
62 | 55 | struct regulator *vdd; |
---|
63 | 56 | }; |
---|
64 | 57 | |
---|