mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
fda8d26e61
Based on 1 normalized pattern(s): licensed under the gpl 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 135 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170026.071193225@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
53 lines
986 B
C
53 lines
986 B
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>
|
|
|
|
#define HTS221_DATA_SIZE 2
|
|
|
|
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;
|
|
};
|
|
|
|
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 hts221_hw *hw);
|
|
int hts221_allocate_trigger(struct hts221_hw *hw);
|
|
|
|
#endif /* HTS221_H */
|