linux/drivers/hwmon/pmbus/max16601.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Hardware monitoring driver for Maxim MAX16508, MAX16600, MAX16601,
 * and MAX16602.
 *
 * Implementation notes:
 *
 * This chip series supports two rails, VCORE and VSA. Telemetry information
 * for the two rails is reported in two subsequent I2C addresses. The driver
 * instantiates a dummy I2C client at the second I2C address to report
 * information for the VSA rail in a single instance of the driver.
 * Telemetry for the VSA rail is reported to the PMBus core in PMBus page 2.
 *
 * The chip reports input current using two separate methods. The input current
 * reported with the standard READ_IIN command is derived from the output
 * current. The first method is reported to the PMBus core with PMBus page 0,
 * the second method is reported with PMBus page 1.
 *
 * The chip supports reading per-phase temperatures and per-phase input/output
 * currents for VCORE. Telemetry is reported in vendor specific registers.
 * The driver translates the vendor specific register values to PMBus standard
 * register values and reports per-phase information in PMBus page 0.
 *
 * Copyright 2019, 2020 Google LLC.
 */

#include <linux/bits.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>

#include "pmbus.h"

enum chips {};

#define REG_DEFAULT_NUM_POP
#define REG_SETPT_DVID
#define DAC_10MV_MODE
#define REG_IOUT_AVG_PK
#define REG_IIN_SENSOR
#define REG_TOTAL_INPUT_POWER
#define REG_PHASE_ID
#define CORE_RAIL_INDICATOR
#define REG_PHASE_REPORTING

#define MAX16601_NUM_PHASES

struct max16601_data {};

#define to_max16601_data(x)

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

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

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

static int max16601_write_word(struct i2c_client *client, int page, int reg,
			       u16 value)
{}

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

static struct pmbus_driver_info max16601_info =;

static void max16601_remove(void *_data)
{}

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

static int max16601_get_id(struct i2c_client *client)
{}

static int max16601_probe(struct i2c_client *client)
{}

static struct i2c_driver max16601_driver =;

module_i2c_driver();

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