#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define SI7005_STATUS 0x00
#define SI7005_CONFIG 0x03
#define SI7005_STATUS_NRDY BIT(0)
#define SI7005_CONFIG_TEMP BIT(4)
#define SI7005_CONFIG_START BIT(0)
#define SI7005_ID_7005 0x50
#define SI7005_ID_7015 0xf0
struct i2c_client *client;
static int si7005_read_measurement(struct si7005_data *data, bool temp)
ret = i2c_smbus_write_byte_data(data->client, SI7005_CONFIG,
data->config | SI7005_CONFIG_START |
(temp ? SI7005_CONFIG_TEMP : 0));
ret = i2c_smbus_read_byte_data(data->client, SI7005_STATUS);
if (!(ret & SI7005_STATUS_NRDY))