#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/time.h>
#define HDC100X_REG_TEMP …
#define HDC100X_REG_HUMIDITY …
#define HDC100X_REG_CONFIG …
#define HDC100X_REG_CONFIG_ACQ_MODE …
#define HDC100X_REG_CONFIG_HEATER_EN …
struct hdc100x_data { … };
static const int hdc100x_int_time[][3] = …;
static const struct { … } hdc100x_resolution_shift[2] = …;
static IIO_CONST_ATTR(temp_integration_time_available,
"0.00365 0.00635");
static IIO_CONST_ATTR(humidityrelative_integration_time_available,
"0.0025 0.00385 0.0065");
static IIO_CONST_ATTR(out_current_heater_raw_available,
"0 1");
static struct attribute *hdc100x_attributes[] = …;
static const struct attribute_group hdc100x_attribute_group = …;
static const struct iio_chan_spec hdc100x_channels[] = …;
static const unsigned long hdc100x_scan_masks[] = …;
static int hdc100x_update_config(struct hdc100x_data *data, int mask, int val)
{ … }
static int hdc100x_set_it_time(struct hdc100x_data *data, int chan, int val2)
{ … }
static int hdc100x_get_measurement(struct hdc100x_data *data,
struct iio_chan_spec const *chan)
{ … }
static int hdc100x_get_heater_status(struct hdc100x_data *data)
{ … }
static int hdc100x_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int hdc100x_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static int hdc100x_buffer_postenable(struct iio_dev *indio_dev)
{ … }
static int hdc100x_buffer_predisable(struct iio_dev *indio_dev)
{ … }
static const struct iio_buffer_setup_ops hdc_buffer_setup_ops = …;
static irqreturn_t hdc100x_trigger_handler(int irq, void *p)
{ … }
static const struct iio_info hdc100x_info = …;
static int hdc100x_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id hdc100x_id[] = …;
MODULE_DEVICE_TABLE(i2c, hdc100x_id);
static const struct of_device_id hdc100x_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
static const struct acpi_device_id hdc100x_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
static struct i2c_driver hdc100x_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;