#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/platform_data/shtc1.h>
#include <linux/of.h>
static const unsigned char shtc1_cmd_measure_blocking_hpm[] = …;
static const unsigned char shtc1_cmd_measure_nonblocking_hpm[] = …;
static const unsigned char shtc1_cmd_measure_blocking_lpm[] = …;
static const unsigned char shtc1_cmd_measure_nonblocking_lpm[] = …;
static const unsigned char shtc1_cmd_read_id_reg[] = …;
#define SHTC3_ID …
#define SHTC3_ID_MASK …
#define SHTC1_ID …
#define SHTC1_ID_MASK …
#define SHTC1_NONBLOCKING_WAIT_TIME_HPM …
#define SHTC1_NONBLOCKING_WAIT_TIME_LPM …
#define SHTC3_NONBLOCKING_WAIT_TIME_HPM …
#define SHTC3_NONBLOCKING_WAIT_TIME_LPM …
#define SHTC1_CMD_LENGTH …
#define SHTC1_RESPONSE_LENGTH …
enum shtcx_chips { … };
struct shtc1_data { … };
static int shtc1_update_values(struct i2c_client *client,
struct shtc1_data *data,
char *buf, int bufsize)
{ … }
static struct shtc1_data *shtc1_update_client(struct device *dev)
{ … }
static ssize_t temp1_input_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t humidity1_input_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(temp1_input);
static DEVICE_ATTR_RO(humidity1_input);
static struct attribute *shtc1_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static void shtc1_select_command(struct shtc1_data *data)
{ … }
static int shtc1_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id shtc1_id[] = …;
MODULE_DEVICE_TABLE(i2c, shtc1_id);
static const struct of_device_id shtc1_of_match[] = …;
MODULE_DEVICE_TABLE(of, shtc1_of_match);
static struct i2c_driver shtc1_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;