linux/drivers/hwmon/ad7314.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AD7314 digital temperature sensor driver for AD7314, ADT7301 and ADT7302
 *
 * Copyright 2010 Analog Devices Inc.
 *
 * Conversion to hwmon from IIO done by Jonathan Cameron <[email protected]>
 */
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/bitops.h>

/*
 * AD7314 temperature masks
 */
#define AD7314_TEMP_MASK
#define AD7314_TEMP_SHIFT

/*
 * ADT7301 and ADT7302 temperature masks
 */
#define ADT7301_TEMP_MASK

enum ad7314_variant {};

struct ad7314_data {};

static int ad7314_spi_read(struct ad7314_data *chip)
{}

static ssize_t ad7314_temperature_show(struct device *dev,
				       struct device_attribute *attr,
				       char *buf)
{}

static SENSOR_DEVICE_ATTR_RO(temp1_input, ad7314_temperature, 0);

static struct attribute *ad7314_attrs[] =;

ATTRIBUTE_GROUPS();

static int ad7314_probe(struct spi_device *spi_dev)
{}

static const struct spi_device_id ad7314_id[] =;
MODULE_DEVICE_TABLE(spi, ad7314_id);

static struct spi_driver ad7314_driver =;

module_spi_driver();

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