proc: use "unsigned int" for sigqueue length
[linux/fpc-iii.git] / drivers / iio / humidity / hts221.h
blobe41a3d83e95d367bf83f0fbda6ef278537a7515b
1 /*
2 * STMicroelectronics hts221 sensor driver
4 * Copyright 2016 STMicroelectronics Inc.
6 * Lorenzo Bianconi <lorenzo.bianconi@st.com>
8 * Licensed under the GPL-2.
9 */
11 #ifndef HTS221_H
12 #define HTS221_H
14 #define HTS221_DEV_NAME "hts221"
16 #include <linux/iio/iio.h>
18 #define HTS221_DATA_SIZE 2
20 enum hts221_sensor_type {
21 HTS221_SENSOR_H,
22 HTS221_SENSOR_T,
23 HTS221_SENSOR_MAX,
26 struct hts221_sensor {
27 u8 cur_avg_idx;
28 int slope, b_gen;
31 struct hts221_hw {
32 const char *name;
33 struct device *dev;
34 struct regmap *regmap;
36 struct iio_trigger *trig;
37 int irq;
39 struct hts221_sensor sensors[HTS221_SENSOR_MAX];
41 bool enabled;
42 u8 odr;
45 extern const struct dev_pm_ops hts221_pm_ops;
47 int hts221_probe(struct device *dev, int irq, const char *name,
48 struct regmap *regmap);
49 int hts221_set_enable(struct hts221_hw *hw, bool enable);
50 int hts221_allocate_buffers(struct hts221_hw *hw);
51 int hts221_allocate_trigger(struct hts221_hw *hw);
53 #endif /* HTS221_H */