linux/drivers/hwmon/pmbus/mp2891.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Hardware monitoring driver for MPS Multi-phase Digital VR Controllers(MP2891)
 */

#include <linux/bitfield.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include "pmbus.h"

/*
 * Vender specific registers, the register MFR_SVI3_IOUT_PRT(0x65),
 * MFR_VOUT_LOOP_CTRL(0xBD), READ_PIN_EST(0x94)and READ_IIN_EST(0x95)
 * redefine the standard PMBUS register. The MFR_SVI3_IOUT_PRT(0x65)
 * is used to identify the iout scale and the MFR_VOUT_LOOP_CTRL(0xBD)
 * is used to identify the vout scale. The READ_PIN_EST(0x94) is used
 * to read input power per rail. The MP2891 does not have standard
 * READ_IIN register(0x89), the iin telemetry can be obtained through
 * the vendor redefined register READ_IIN_EST(0x95).
 */
#define MFR_VOUT_LOOP_CTRL
#define READ_PIN_EST
#define READ_IIN_EST
#define MFR_SVI3_IOUT_PRT

#define MP2891_TEMP_LIMIT_OFFSET
#define MP2891_PIN_LIMIT_UINT
#define MP2891_IOUT_LIMIT_UINT
#define MP2891_IOUT_SCALE_DIV
#define MP2891_VOUT_SCALE_DIV
#define MP2891_OVUV_DELTA_SCALE
#define MP2891_OV_LIMIT_SCALE
#define MP2891_UV_LIMIT_SCALE

#define MP2891_PAGE_NUM

#define MP2891_RAIL1_FUNC

#define MP2891_RAIL2_FUNC

struct mp2891_data {};

#define to_mp2891_data(x)

/* Converts a LINEAR11 value to DIRECT format */
static u16 mp2891_reg2data_linear11(u16 word)
{}

static int
mp2891_identify_vout_scale(struct i2c_client *client, struct pmbus_driver_info *info,
			   int page)
{}

static int
mp2891_identify_iout_scale(struct i2c_client *client, struct pmbus_driver_info *info,
			   int page)
{}

static int mp2891_identify(struct i2c_client *client, struct pmbus_driver_info *info)
{}

static int mp2891_read_byte_data(struct i2c_client *client, int page, int reg)
{}

static int mp2891_read_word_data(struct i2c_client *client, int page,
				 int phase, int reg)
{}

static int mp2891_write_word_data(struct i2c_client *client, int page, int reg,
				  u16 word)
{}

static const struct pmbus_driver_info mp2891_info =;

static int mp2891_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver mp2891_driver =;

module_i2c_driver();

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