linux/drivers/hwmon/lm73.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * LM73 Sensor driver
 * Based on LM75
 *
 * Copyright (C) 2007, CenoSYS (www.cenosys.com).
 * Copyright (C) 2009, Bollore telecom (www.bolloretelecom.eu).
 *
 * Guillaume Ligneul <[email protected]>
 * Adrien Demarez <[email protected]>
 * Jeremy Laine <[email protected]>
 * Chris Verges <[email protected]>
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>


/* Addresses scanned */
static const unsigned short normal_i2c[] =;

/* LM73 registers */
#define LM73_REG_INPUT
#define LM73_REG_CONF
#define LM73_REG_MAX
#define LM73_REG_MIN
#define LM73_REG_CTRL
#define LM73_REG_ID

#define LM73_ID
#define DRVNAME
#define LM73_TEMP_MIN
#define LM73_TEMP_MAX

#define LM73_CTRL_RES_SHIFT
#define LM73_CTRL_RES_MASK
#define LM73_CTRL_TO_MASK

#define LM73_CTRL_HI_SHIFT
#define LM73_CTRL_LO_SHIFT

static const unsigned short lm73_convrates[] =;

struct lm73_data {};

/*-----------------------------------------------------------------------*/

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

static ssize_t temp_show(struct device *dev, struct device_attribute *da,
			 char *buf)
{}

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

static ssize_t convrate_show(struct device *dev, struct device_attribute *da,
			     char *buf)
{}

static ssize_t maxmin_alarm_show(struct device *dev,
				 struct device_attribute *da, char *buf)
{}

/*-----------------------------------------------------------------------*/

/* sysfs attributes for hwmon */

static SENSOR_DEVICE_ATTR_RW(temp1_max, temp, LM73_REG_MAX);
static SENSOR_DEVICE_ATTR_RW(temp1_min, temp, LM73_REG_MIN);
static SENSOR_DEVICE_ATTR_RO(temp1_input, temp, LM73_REG_INPUT);
static SENSOR_DEVICE_ATTR_RW(update_interval, convrate, 0);
static SENSOR_DEVICE_ATTR_RO(temp1_max_alarm, maxmin_alarm,
			     LM73_CTRL_HI_SHIFT);
static SENSOR_DEVICE_ATTR_RO(temp1_min_alarm, maxmin_alarm,
			     LM73_CTRL_LO_SHIFT);

static struct attribute *lm73_attrs[] =;
ATTRIBUTE_GROUPS();

/*-----------------------------------------------------------------------*/

/* device probe and removal */

static int
lm73_probe(struct i2c_client *client)
{}

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

/* Return 0 if detection is successful, -ENODEV otherwise */
static int lm73_detect(struct i2c_client *new_client,
			struct i2c_board_info *info)
{}

static const struct of_device_id lm73_of_match[] =;

MODULE_DEVICE_TABLE(of, lm73_of_match);

static struct i2c_driver lm73_driver =;

module_i2c_driver();

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