linux/drivers/hwmon/max6621.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Hardware monitoring driver for Maxim MAX6621
 *
 * Copyright (c) 2017 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2017 Vadim Pasternak <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>

#define MAX6621_DRV_NAME
#define MAX6621_TEMP_INPUT_REG_NUM
#define MAX6621_TEMP_INPUT_MIN
#define MAX6621_TEMP_INPUT_MAX
#define MAX6621_TEMP_ALERT_CHAN_SHIFT

#define MAX6621_TEMP_S0D0_REG
#define MAX6621_TEMP_S0D1_REG
#define MAX6621_TEMP_S1D0_REG
#define MAX6621_TEMP_S1D1_REG
#define MAX6621_TEMP_S2D0_REG
#define MAX6621_TEMP_S2D1_REG
#define MAX6621_TEMP_S3D0_REG
#define MAX6621_TEMP_S3D1_REG
#define MAX6621_TEMP_MAX_REG
#define MAX6621_TEMP_MAX_ADDR_REG
#define MAX6621_TEMP_ALERT_CAUSE_REG
#define MAX6621_CONFIG0_REG
#define MAX6621_CONFIG1_REG
#define MAX6621_CONFIG2_REG
#define MAX6621_CONFIG3_REG
#define MAX6621_TEMP_S0_ALERT_REG
#define MAX6621_TEMP_S1_ALERT_REG
#define MAX6621_TEMP_S2_ALERT_REG
#define MAX6621_TEMP_S3_ALERT_REG
#define MAX6621_CLEAR_ALERT_REG
#define MAX6621_REG_MAX
#define MAX6621_REG_TEMP_SHIFT

#define MAX6621_ENABLE_TEMP_ALERTS_BIT
#define MAX6621_ENABLE_I2C_CRC_BIT
#define MAX6621_ENABLE_ALTERNATE_DATA
#define MAX6621_ENABLE_LOCKUP_TO
#define MAX6621_ENABLE_S0D0_BIT
#define MAX6621_ENABLE_S3D1_BIT
#define MAX6621_ENABLE_TEMP_ALL
#define MAX6621_POLL_DELAY_MASK
#define MAX6621_CONFIG0_INIT
#define MAX6621_PECI_BIT_TIME
#define MAX6621_PECI_RETRY_NUM
#define MAX6621_CONFIG1_INIT

/* Error codes */
#define MAX6621_TRAN_FAILED
#define MAX6621_POOL_DIS
#define MAX6621_POOL_UNCOMPLETE
#define MAX6621_SD_DIS
#define MAX6621_ALERT_DIS
#define MAX6621_PECI_ERR_MIN
#define MAX6621_PECI_ERR_MAX

static const u32 max6621_temp_regs[] =;

static const char *const max6621_temp_labels[] =;

static const int max6621_temp_alert_chan2reg[] =;

/**
 * struct max6621_data - private data:
 *
 * @client: I2C client;
 * @regmap: register map handle;
 * @input_chan2reg: mapping from channel to register;
 */
struct max6621_data {};

static long max6621_temp_mc2reg(long val)
{}

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

static int max6621_verify_reg_data(struct device *dev, int regval)
{}

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

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

static int
max6621_read_string(struct device *dev, enum hwmon_sensor_types type, u32 attr,
		    int channel, const char **str)
{}

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

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

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

static const struct reg_default max6621_regmap_default[] =;

static const struct regmap_config max6621_regmap_config =;

static const struct hwmon_channel_info * const max6621_info[] =;

static const struct hwmon_ops max6621_hwmon_ops =;

static const struct hwmon_chip_info max6621_chip_info =;

static int max6621_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver max6621_driver =;

module_i2c_driver();

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