#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/pm.h>
#include <linux/bitops.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define TMP006_VOBJECT …
#define TMP006_TAMBIENT …
#define TMP006_CONFIG …
#define TMP006_MANUFACTURER_ID …
#define TMP006_DEVICE_ID …
#define TMP006_TAMBIENT_SHIFT …
#define TMP006_CONFIG_RESET …
#define TMP006_CONFIG_DRDY_EN …
#define TMP006_CONFIG_DRDY …
#define TMP006_CONFIG_MOD_MASK …
#define TMP006_CONFIG_CR_MASK …
#define TMP006_CONFIG_CR_SHIFT …
#define TMP006_MANUFACTURER_MAGIC …
#define TMP006_DEVICE_MAGIC …
struct tmp006_data { … };
static int tmp006_read_measurement(struct tmp006_data *data, u8 reg)
{ … }
static const int tmp006_freqs[5][2] = …;
static int tmp006_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *channel, int *val,
int *val2, long mask)
{ … }
static int tmp006_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val,
int val2,
long mask)
{ … }
static IIO_CONST_ATTR(sampling_frequency_available, "4 2 1 0.5 0.25");
static struct attribute *tmp006_attributes[] = …;
static const struct attribute_group tmp006_attribute_group = …;
static const struct iio_chan_spec tmp006_channels[] = …;
static const struct iio_info tmp006_info = …;
static bool tmp006_check_identification(struct i2c_client *client)
{ … }
static int tmp006_power(struct device *dev, bool up)
{ … }
static void tmp006_powerdown_cleanup(void *dev)
{ … }
static int tmp006_probe(struct i2c_client *client)
{ … }
static int tmp006_suspend(struct device *dev)
{ … }
static int tmp006_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(tmp006_pm_ops, tmp006_suspend, tmp006_resume);
static const struct of_device_id tmp006_of_match[] = …;
MODULE_DEVICE_TABLE(of, tmp006_of_match);
static const struct i2c_device_id tmp006_id[] = …;
MODULE_DEVICE_TABLE(i2c, tmp006_id);
static struct i2c_driver tmp006_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;