Commit | Line | Data |
---|---|---|
69548b7c UKK |
1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | ||
3 | #define LTC2497_ENABLE 0xA0 | |
4 | #define LTC2497_CONFIG_DEFAULT LTC2497_ENABLE | |
5 | #define LTC2497_CONVERSION_TIME_MS 150ULL | |
6 | ||
2187cfeb CR |
7 | struct ltc2497_chip_info { |
8 | u32 resolution; | |
1695c52a | 9 | const char *name; |
2187cfeb CR |
10 | }; |
11 | ||
69548b7c UKK |
12 | struct ltc2497core_driverdata { |
13 | struct regulator *ref; | |
14 | ktime_t time_prev; | |
da8091f8 NS |
15 | /* lock to protect against multiple access to the device */ |
16 | struct mutex lock; | |
2187cfeb | 17 | const struct ltc2497_chip_info *chip_info; |
69548b7c UKK |
18 | u8 addr_prev; |
19 | int (*result_and_measure)(struct ltc2497core_driverdata *ddata, | |
20 | u8 address, int *val); | |
21 | }; | |
22 | ||
23 | int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev); | |
24 | void ltc2497core_remove(struct iio_dev *indio_dev); | |
25 | ||
26 | MODULE_IMPORT_NS(LTC2497); |