linux/drivers/hwmon/max1668.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2011 David George <[email protected]>
 *
 * based on adm1021.c
 * some credit to Christoph Scheurer, but largely a rewrite
 */

#include <linux/bitops.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/regmap.h>
#include <linux/slab.h>

/* Addresses to scan */
static const unsigned short max1668_addr_list[] =;

/* max1668 registers */

#define MAX1668_REG_TEMP(nr)
#define MAX1668_REG_STAT1
#define MAX1668_REG_STAT2
#define MAX1668_REG_MAN_ID
#define MAX1668_REG_DEV_ID

/* limits */

/* high limits */
#define MAX1668_REG_LIMH(nr)
/* read low limits */
#define MAX1668_REG_LIML(nr)

/* manufacturer and device ID Constants */
#define MAN_ID_MAXIM
#define DEV_ID_MAX1668
#define DEV_ID_MAX1805
#define DEV_ID_MAX1989

/* read only mode module parameter */
static bool read_only;
module_param(read_only, bool, 0);
MODULE_PARM_DESC();

struct max1668_data {};

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

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

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

static const struct hwmon_channel_info * const max1668_info[] =;

static const struct hwmon_ops max1668_hwmon_ops =;

static const struct hwmon_chip_info max1668_chip_info =;

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

/* regmap */

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

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

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

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

static const struct regmap_config max1668_regmap_config =;

static const struct regmap_bus max1668_regmap_bus =;

static int max1668_probe(struct i2c_client *client)
{}

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

/* This is the driver that will be inserted */
static struct i2c_driver max1668_driver =;

module_i2c_driver();

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