linux/drivers/hwmon/ad7414.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * An hwmon driver for the Analog Devices AD7414
 *
 * Copyright 2006 Stefan Roese <sr at denx.de>, DENX Software Engineering
 *
 * Copyright (c) 2008 PIKA Technologies
 *   Sean MacLennan <[email protected]>
 *
 * Copyright (c) 2008 Spansion Inc.
 *   Frank Edelhaeuser <frank.edelhaeuser at spansion.com>
 *   (converted to "new style" I2C driver model, removed checkpatch.pl warnings)
 *
 * Based on ad7418.c
 * Copyright 2006 Tower Technologies, Alessandro Zummo <a.zummo at towertech.it>
 */

#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/slab.h>


/* AD7414 registers */
#define AD7414_REG_TEMP
#define AD7414_REG_CONF
#define AD7414_REG_T_HIGH
#define AD7414_REG_T_LOW

static u8 AD7414_REG_LIMIT[] =;

struct ad7414_data {};

/* REG: (0.25C/bit, two's complement) << 6 */
static inline int ad7414_temp_from_reg(s16 reg)
{}

static inline int ad7414_read(struct i2c_client *client, u8 reg)
{}

static inline int ad7414_write(struct i2c_client *client, u8 reg, u8 value)
{}

static struct ad7414_data *ad7414_update_device(struct device *dev)
{}

static ssize_t temp_input_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}
static SENSOR_DEVICE_ATTR_RO(temp1_input, temp_input, 0);

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

static ssize_t max_min_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static SENSOR_DEVICE_ATTR_RW(temp1_max, max_min, 0);
static SENSOR_DEVICE_ATTR_RW(temp1_min, max_min, 1);

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

static SENSOR_DEVICE_ATTR_RO(temp1_min_alarm, alarm, 3);
static SENSOR_DEVICE_ATTR_RO(temp1_max_alarm, alarm, 4);

static struct attribute *ad7414_attrs[] =;

ATTRIBUTE_GROUPS();

static int ad7414_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver ad7414_driver =;

module_i2c_driver();

MODULE_AUTHOR();

MODULE_DESCRIPTION();
MODULE_LICENSE();