linux/drivers/hwmon/lm95241.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2008, 2010 Davide Rizzo <[email protected]>
 *
 * The LM95241 is a sensor chip made by National Semiconductors.
 * It reports up to three temperatures (its own plus up to two external ones).
 * Complete datasheet can be obtained from National's website at:
 *   http://www.national.com/ds.cgi/LM/LM95241.pdf
 */

#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>

#define DEVNAME

static const unsigned short normal_i2c[] =;

/* LM95241 registers */
#define LM95241_REG_R_MAN_ID
#define LM95241_REG_R_CHIP_ID
#define LM95241_REG_R_STATUS
#define LM95241_REG_RW_CONFIG
#define LM95241_REG_RW_REM_FILTER
#define LM95241_REG_RW_TRUTHERM
#define LM95241_REG_W_ONE_SHOT
#define LM95241_REG_R_LOCAL_TEMPH
#define LM95241_REG_R_REMOTE1_TEMPH
#define LM95241_REG_R_REMOTE2_TEMPH
#define LM95241_REG_R_LOCAL_TEMPL
#define LM95241_REG_R_REMOTE1_TEMPL
#define LM95241_REG_R_REMOTE2_TEMPL
#define LM95241_REG_RW_REMOTE_MODEL

/* LM95241 specific bitfields */
#define CFG_STOP
#define CFG_CR0076
#define CFG_CR0182
#define CFG_CR1000
#define CFG_CR2700
#define CFG_CRMASK
#define R1MS_MASK
#define R2MS_MASK
#define R1DF_MASK
#define R2DF_MASK
#define R1FE_MASK
#define R2FE_MASK
#define R1DM
#define R2DM
#define TT1_SHIFT
#define TT2_SHIFT
#define TT_OFF
#define TT_ON
#define TT_MASK
#define NATSEMI_MAN_ID
#define LM95231_CHIP_ID
#define LM95241_CHIP_ID

static const u8 lm95241_reg_address[] =;

/* Client data (each client gets its own) */
struct lm95241_data {};

/* Conversions */
static int temp_from_reg_signed(u8 val_h, u8 val_l)
{}

static int temp_from_reg_unsigned(u8 val_h, u8 val_l)
{}

static struct lm95241_data *lm95241_update_device(struct device *dev)
{}

static int lm95241_read_chip(struct device *dev, u32 attr, int channel,
			     long *val)
{}

static int lm95241_read_temp(struct device *dev, u32 attr, int channel,
			     long *val)
{}

static int lm95241_read(struct device *dev, enum hwmon_sensor_types type,
			u32 attr, int channel, long *val)
{}

static int lm95241_write_chip(struct device *dev, u32 attr, int channel,
			      long val)
{}

static int lm95241_write_temp(struct device *dev, u32 attr, int channel,
			      long val)
{}

static int lm95241_write(struct device *dev, enum hwmon_sensor_types type,
			 u32 attr, int channel, long val)
{}

static umode_t lm95241_is_visible(const void *data,
				  enum hwmon_sensor_types type,
				  u32 attr, int channel)
{}

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

static void lm95241_init_client(struct i2c_client *client,
				struct lm95241_data *data)
{}

static const struct hwmon_channel_info * const lm95241_info[] =;

static const struct hwmon_ops lm95241_hwmon_ops =;

static const struct hwmon_chip_info lm95241_chip_info =;

static int lm95241_probe(struct i2c_client *client)
{}

/* Driver data (common to all clients) */
static const struct i2c_device_id lm95241_id[] =;
MODULE_DEVICE_TABLE(i2c, lm95241_id);

static struct i2c_driver lm95241_driver =;

module_i2c_driver();

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