linux/drivers/iio/humidity/hts221.h
Greg Kroah-Hartman 263771dbc8 Linux 5.8-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl8UzA4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGQ7cH/3v+Gv+SmHJCvaT2
 CSu0+7okVnYbY3UTb3hykk7/aOqb6284KjxR03r0CWFzsEsZVhC5pvvruASSiMQg
 Pi04sLqv6CsGLHd1n+pl4AUYEaxq6k4KS3uU3HHSWxrahDDApQoRUx2F8lpOxyj8
 RiwnoO60IMPA7IFJqzcZuFqsgdxqiiYvnzT461KX8Mrw6fyMXeR2KAj2NwMX8dZN
 At21Sf8+LSoh6q2HnugfiUd/jR10XbfxIIx2lXgIinb15GXgWydEQVrDJ7cUV7ix
 Jd0S+dtOtp+lWtFHDoyjjqqsMV7+G8i/rFNZoxSkyZqsUTaKzaR6JD3moSyoYZgG
 0+eXO4A=
 =9EpR
 -----END PGP SIGNATURE-----

Merge 5.8-rc6 into staging-next

We need the staging fixes in here, and it resolves a merge issue with an
iio driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-20 09:37:31 +02:00

56 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* STMicroelectronics hts221 sensor driver
*
* Copyright 2016 STMicroelectronics Inc.
*
* Lorenzo Bianconi <lorenzo.bianconi@st.com>
*/
#ifndef HTS221_H
#define HTS221_H
#define HTS221_DEV_NAME "hts221"
#include <linux/iio/iio.h>
enum hts221_sensor_type {
HTS221_SENSOR_H,
HTS221_SENSOR_T,
HTS221_SENSOR_MAX,
};
struct hts221_sensor {
u8 cur_avg_idx;
int slope, b_gen;
};
struct hts221_hw {
const char *name;
struct device *dev;
struct regmap *regmap;
struct iio_trigger *trig;
int irq;
struct hts221_sensor sensors[HTS221_SENSOR_MAX];
bool enabled;
u8 odr;
/* Ensure natural alignment of timestamp */
struct {
__le16 channels[2];
s64 ts __aligned(8);
} scan;
};
extern const struct dev_pm_ops hts221_pm_ops;
int hts221_probe(struct device *dev, int irq, const char *name,
struct regmap *regmap);
int hts221_set_enable(struct hts221_hw *hw, bool enable);
int hts221_allocate_buffers(struct iio_dev *iio_dev);
int hts221_allocate_trigger(struct iio_dev *iio_dev);
#endif /* HTS221_H */