#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(…);