linux/drivers/hwmon/max6697.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2012 Guenter Roeck <[email protected]>
 *
 * based on max1668.c
 * Copyright (c) 2011 David George <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/slab.h>

enum chips {};

/* Report local sensor as temp1 */

static const u8 MAX6697_REG_TEMP[] =;
static const u8 MAX6697_REG_TEMP_EXT[] =;
static const u8 MAX6697_REG_MAX[] =;
static const u8 MAX6697_REG_CRIT[] =;

#define MAX6697_REG_MIN
/*
 * Map device tree / internal register bit map to chip bit map.
 * Applies to alert register and over-temperature register.
 */

#define MAX6697_EXTERNAL_MASK_DT
#define MAX6697_LOCAL_MASK_DT
#define MAX6697_EXTERNAL_MASK_CHIP
#define MAX6697_LOCAL_MASK_CHIP

/* alert - local channel is in bit 6 */
#define MAX6697_ALERT_MAP_BITS(reg)

/* over-temperature - local channel is in bit 7 */
#define MAX6697_OVERT_MAP_BITS(reg)

#define MAX6697_REG_STAT_ALARM
#define MAX6697_REG_STAT_CRIT
#define MAX6697_REG_STAT_FAULT
#define MAX6697_REG_STAT_MIN_ALARM

#define MAX6697_REG_CONFIG
#define MAX6581_CONF_EXTENDED
#define MAX6693_CONF_BETA
#define MAX6697_CONF_RESISTANCE
#define MAX6697_CONF_TIMEOUT
#define MAX6697_REG_ALERT_MASK
#define MAX6697_REG_OVERT_MASK

#define MAX6581_REG_RESISTANCE
#define MAX6581_REG_IDEALITY
#define MAX6581_REG_IDEALITY_SELECT
#define MAX6581_REG_OFFSET
#define MAX6581_REG_OFFSET_SELECT
#define MAX6581_OFFSET_MIN
#define MAX6581_OFFSET_MAX

#define MAX6697_CONV_TIME

struct max6697_chip_data {};

struct max6697_data {};

static const struct max6697_chip_data max6697_chip_data[] =;

static int max6697_alarm_channel_map(int channel)
{}

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

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

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

/* Return 0 if detection is successful, -ENODEV otherwise */
static const struct hwmon_channel_info * const max6697_info[] =;

static const struct hwmon_ops max6697_hwmon_ops =;

static const struct hwmon_chip_info max6697_chip_info =;

static int max6697_config_of(struct device_node *node, struct max6697_data *data)
{}

static int max6697_init_chip(struct device_node *np, struct max6697_data *data)
{}

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

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

static const struct regmap_config max6697_regmap_config =;

static int max6697_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver max6697_driver =;

module_i2c_driver();

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