#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pmbus.h>
#include "pmbus.h"
#define MP2856_MFR_VR_MULTI_CONFIG_R1 …
#define MP2856_MFR_VR_MULTI_CONFIG_R2 …
#define MP2856_MUL1_BOOT_SR_R2 …
#define MP2856_VR_ACTIVE …
#define MP2856_MFR_VR_CONFIG2 …
#define MP2856_VOUT_MODE …
#define MP2856_MFR_VR_CONFIG1 …
#define MP2856_DRMOS_KCS …
#define MP2856_MFR_READ_CS1_2_R1 …
#define MP2856_MFR_READ_CS3_4_R1 …
#define MP2856_MFR_READ_CS5_6_R1 …
#define MP2856_MFR_READ_CS7_8_R1 …
#define MP2856_MFR_READ_CS9_10_R1 …
#define MP2856_MFR_READ_CS11_12_R1 …
#define MP2856_MFR_READ_CS1_2_R2 …
#define MP2856_MFR_READ_CS3_4_R2 …
#define MP2856_MFR_READ_CS5_6_R2 …
#define MP2856_MAX_PHASE_RAIL1 …
#define MP2856_MAX_PHASE_RAIL2 …
#define MP2857_MAX_PHASE_RAIL1 …
#define MP2857_MAX_PHASE_RAIL2 …
#define MP2856_PAGE_NUM …
enum chips { … };
static const int mp2856_max_phases[][MP2856_PAGE_NUM] = …;
static const struct i2c_device_id mp2856_id[] = …;
MODULE_DEVICE_TABLE(i2c, mp2856_id);
struct mp2856_data { … };
#define to_mp2856_data(x) …
#define MAX_LIN_MANTISSA …
#define MIN_LIN_MANTISSA …
static u16 val2linear11(s64 val)
{ … }
static int
mp2856_read_word_helper(struct i2c_client *client, int page, int phase, u8 reg,
u16 mask)
{ … }
static int
mp2856_read_vout(struct i2c_client *client, struct mp2856_data *data, int page,
int phase, u8 reg)
{ … }
static int
mp2856_read_phase(struct i2c_client *client, struct mp2856_data *data,
int page, int phase, u8 reg)
{ … }
static int
mp2856_read_phases(struct i2c_client *client, struct mp2856_data *data,
int page, int phase)
{ … }
static int
mp2856_read_word_data(struct i2c_client *client, int page,
int phase, int reg)
{ … }
static int
mp2856_read_byte_data(struct i2c_client *client, int page, int reg)
{ … }
static int
mp2856_identify_multiphase(struct i2c_client *client, u8 reg, u8 max_phase,
u16 mask)
{ … }
static int
mp2856_identify_multiphase_rail1(struct i2c_client *client,
struct mp2856_data *data)
{ … }
static int
mp2856_identify_multiphase_rail2(struct i2c_client *client,
struct mp2856_data *data)
{ … }
static int
mp2856_current_sense_gain_get(struct i2c_client *client,
struct mp2856_data *data)
{ … }
static int
mp2856_identify_vout_format(struct i2c_client *client,
struct mp2856_data *data)
{ … }
static bool
mp2856_is_rail2_active(struct i2c_client *client)
{ … }
static struct pmbus_driver_info mp2856_info = …;
static int mp2856_probe(struct i2c_client *client)
{ … }
static const struct of_device_id __maybe_unused mp2856_of_match[] = …;
MODULE_DEVICE_TABLE(of, mp2856_of_match);
static struct i2c_driver mp2856_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);