#include <linux/crc8.h>
#include <linux/delay.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#define SHT4X_MIN_POLL_INTERVAL …
#define SHT4X_MEAS_DELAY_HPM …
#define SHT4X_DELAY_EXTRA …
#define SHT4X_CMD_MEASURE_HPM …
#define SHT4X_CMD_RESET …
#define SHT4X_CMD_LEN …
#define SHT4X_CRC8_LEN …
#define SHT4X_WORD_LEN …
#define SHT4X_RESPONSE_LENGTH …
#define SHT4X_CRC8_POLYNOMIAL …
#define SHT4X_CRC8_INIT …
#define SHT4X_MIN_TEMPERATURE …
#define SHT4X_MAX_TEMPERATURE …
#define SHT4X_MIN_HUMIDITY …
#define SHT4X_MAX_HUMIDITY …
DECLARE_CRC8_TABLE(sht4x_crc8_table);
struct sht4x_data { … };
static int sht4x_read_values(struct sht4x_data *data)
{ … }
static ssize_t sht4x_interval_write(struct sht4x_data *data, long val)
{ … }
static size_t sht4x_interval_read(struct sht4x_data *data, long *val)
{ … }
static int sht4x_temperature1_read(struct sht4x_data *data, long *val)
{ … }
static int sht4x_humidity1_read(struct sht4x_data *data, long *val)
{ … }
static umode_t sht4x_hwmon_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static int sht4x_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int sht4x_hwmon_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static const struct hwmon_channel_info * const sht4x_info[] = …;
static const struct hwmon_ops sht4x_hwmon_ops = …;
static const struct hwmon_chip_info sht4x_chip_info = …;
static int sht4x_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id sht4x_id[] = …;
MODULE_DEVICE_TABLE(i2c, sht4x_id);
static const struct of_device_id sht4x_of_match[] = …;
MODULE_DEVICE_TABLE(of, sht4x_of_match);
static struct i2c_driver sht4x_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;