linux/drivers/iio/temperature/tmp117.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Digital temperature sensor with integrated Non-volatile memory
 * Copyright (c) 2021 Puranjay Mohan <[email protected]>
 *
 * Driver for the Texas Instruments TMP117 Temperature Sensor
 * (7-bit I2C slave address (0x48 - 0x4B), changeable via ADD pins)
 *
 * Note: This driver assumes that the sensor has been calibrated beforehand.
 */

#include <linux/delay.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>

#include <linux/iio/iio.h>

#define TMP117_REG_TEMP
#define TMP117_REG_CFGR
#define TMP117_REG_HIGH_LIM
#define TMP117_REG_LOW_LIM
#define TMP117_REG_EEPROM_UL
#define TMP117_REG_EEPROM1
#define TMP117_REG_EEPROM2
#define TMP117_REG_TEMP_OFFSET
#define TMP117_REG_EEPROM3
#define TMP117_REG_DEVICE_ID

#define TMP117_RESOLUTION_10UC
#define MICRODEGREE_PER_10MILLIDEGREE

#define TMP116_DEVICE_ID
#define TMP117_DEVICE_ID

struct tmp117_data {};

struct tmp11x_info {};

static int tmp117_read_raw(struct iio_dev *indio_dev,
			   struct iio_chan_spec const *channel, int *val,
			   int *val2, long mask)
{}

static int tmp117_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec
			    const *channel, int val, int val2, long mask)
{}

static const struct iio_chan_spec tmp117_channels[] =;

static const struct iio_chan_spec tmp116_channels[] =;

static const struct tmp11x_info tmp116_channels_info =;

static const struct tmp11x_info tmp117_channels_info =;

static const struct iio_info tmp117_info =;

static int tmp117_probe(struct i2c_client *client)
{}

static const struct of_device_id tmp117_of_match[] =;
MODULE_DEVICE_TABLE(of, tmp117_of_match);

static const struct i2c_device_id tmp117_id[] =;
MODULE_DEVICE_TABLE(i2c, tmp117_id);

static struct i2c_driver tmp117_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();