linux/drivers/hwmon/max1619.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * max1619.c - Part of lm_sensors, Linux kernel modules for hardware
 *             monitoring
 * Copyright (C) 2003-2004 Oleksij Rempel <[email protected]>
 *                         Jean Delvare <[email protected]>
 *
 * Based on the lm90 driver. The MAX1619 is a sensor chip made by Maxim.
 * It reports up to two temperatures (its own plus up to
 * one external one). Complete datasheet can be
 * obtained from Maxim's website at:
 *   http://pdfserv.maxim-ic.com/en/ds/MAX1619.pdf
 */

#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/util_macros.h>

static const unsigned short normal_i2c[] =;

#define MAX1619_REG_LOCAL_TEMP
#define MAX1619_REG_REMOTE_TEMP
#define MAX1619_REG_STATUS
#define MAX1619_REG_CONFIG
#define MAX1619_REG_CONVRATE
#define MAX1619_REG_REMOTE_HIGH
#define MAX1619_REG_REMOTE_LOW
#define MAX1619_REG_REMOTE_CRIT
#define MAX1619_REG_REMOTE_CRIT_HYST
#define MAX1619_REG_MAN_ID
#define MAX1619_REG_CHIP_ID

static int get_alarms(struct regmap *regmap)
{}

static int max1619_temp_read(struct regmap *regmap, u32 attr, int channel, long *val)
{}

static u16 update_intervals[] =;

static int max1619_chip_read(struct regmap *regmap, u32 attr, long *val)
{}

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

static int max1619_chip_write(struct regmap *regmap, u32 attr, long val)
{}

static int max1619_temp_write(struct regmap *regmap,
			      u32 attr, int channel, long val)
{}

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

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

static const struct hwmon_channel_info * const max1619_info[] =;

static const struct hwmon_ops max1619_hwmon_ops =;

static const struct hwmon_chip_info max1619_chip_info =;

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

static int max1619_init_chip(struct regmap *regmap)
{}

/* regmap */

static int max1619_reg_read(void *context, unsigned int reg, unsigned int *val)
{}

static int max1619_reg_write(void *context, unsigned int reg, unsigned int val)
{}

static bool max1619_regmap_is_volatile(struct device *dev, unsigned int reg)
{}

static bool max1619_regmap_is_writeable(struct device *dev, unsigned int reg)
{}

static const struct regmap_config max1619_regmap_config =;

static const struct regmap_bus max1619_regmap_bus =;

static int max1619_probe(struct i2c_client *client)
{}

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

#ifdef CONFIG_OF
static const struct of_device_id max1619_of_match[] =;

MODULE_DEVICE_TABLE(of, max1619_of_match);
#endif

static struct i2c_driver max1619_driver =;

module_i2c_driver();

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