#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/i2c.h>
#include <linux/jiffies.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/pmbus.h>
#include "pmbus.h"
#define CFFPS_CCIN_CMD …
#define CFFPS_FW_CMD …
#define CFFPS1_FW_NUM_BYTES …
#define CFFPS2_FW_NUM_WORDS …
#define CFFPS_SYS_CONFIG_CMD …
#define CFFPS_12VCS_VOUT_CMD …
#define CFFPS_INPUT_HISTORY_CMD …
#define CFFPS_INPUT_HISTORY_SIZE …
#define CFFPS_CCIN_REVISION …
#define CFFPS_CCIN_REVISION_LEGACY …
#define CFFPS_CCIN_VERSION …
#define CFFPS_CCIN_VERSION_1 …
#define CFFPS_CCIN_VERSION_2 …
#define CFFPS_CCIN_VERSION_3 …
#define CFFPS_MFR_FAN_FAULT …
#define CFFPS_MFR_THERMAL_FAULT …
#define CFFPS_MFR_OV_FAULT …
#define CFFPS_MFR_UV_FAULT …
#define CFFPS_MFR_PS_KILL …
#define CFFPS_MFR_OC_FAULT …
#define CFFPS_MFR_VAUX_FAULT …
#define CFFPS_MFR_CURRENT_SHARE_WARNING …
#define CFFPS_LED_BLINK …
#define CFFPS_LED_ON …
#define CFFPS_LED_OFF …
#define CFFPS_BLINK_RATE_MS …
enum { … };
enum versions { … };
struct ibm_cffps { … };
#define to_psu(x, y) …
static ssize_t ibm_cffps_debugfs_read_input_history(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations ibm_cffps_input_history_fops = …;
static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t ibm_cffps_debugfs_write(struct file *file,
const char __user *buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations ibm_cffps_fops = …;
static int ibm_cffps_read_byte_data(struct i2c_client *client, int page,
int reg)
{ … }
static int ibm_cffps_read_word_data(struct i2c_client *client, int page,
int phase, int reg)
{ … }
static int ibm_cffps_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int ibm_cffps_led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
{ … }
static void ibm_cffps_create_led_class(struct ibm_cffps *psu)
{ … }
static struct pmbus_driver_info ibm_cffps_info[] = …;
static struct pmbus_platform_data ibm_cffps_pdata = …;
static const struct i2c_device_id ibm_cffps_id[] = …;
MODULE_DEVICE_TABLE(i2c, ibm_cffps_id);
static int ibm_cffps_probe(struct i2c_client *client)
{ … }
static const struct of_device_id ibm_cffps_of_match[] = …;
MODULE_DEVICE_TABLE(of, ibm_cffps_of_match);
static struct i2c_driver ibm_cffps_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);