#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/platform_data/mlxcpld.h>
#include <linux/platform_data/mlxreg.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define MLXREG_LC_REG_CPLD1_VER_OFFSET …
#define MLXREG_LC_REG_FPGA1_VER_OFFSET …
#define MLXREG_LC_REG_CPLD1_PN_OFFSET …
#define MLXREG_LC_REG_FPGA1_PN_OFFSET …
#define MLXREG_LC_REG_RESET_CAUSE_OFFSET …
#define MLXREG_LC_REG_LED1_OFFSET …
#define MLXREG_LC_REG_GP0_OFFSET …
#define MLXREG_LC_REG_FIELD_UPGRADE …
#define MLXREG_LC_CHANNEL_I2C_REG …
#define MLXREG_LC_REG_CPLD1_MVER_OFFSET …
#define MLXREG_LC_REG_FPGA1_MVER_OFFSET …
#define MLXREG_LC_REG_MAX_POWER_OFFSET …
#define MLXREG_LC_REG_CONFIG_OFFSET …
#define MLXREG_LC_REG_MAX …
enum mlxreg_lc_type { … };
enum mlxreg_lc_state { … };
#define MLXREG_LC_CONFIGURED …
struct mlxreg_lc { … };
static bool mlxreg_lc_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static bool mlxreg_lc_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool mlxreg_lc_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct reg_default mlxreg_lc_regmap_default[] = …;
static const struct regmap_config mlxreg_lc_regmap_conf = …;
static int mlxreg_lc_chan[] = …;
static struct mlxcpld_mux_plat_data mlxreg_lc_mux_data[] = …;
static struct i2c_board_info mlxreg_lc_mux_brdinfo = …;
static struct i2c_board_info mlxreg_lc_aux_pwr_devices[] = …;
static struct mlxreg_hotplug_device mlxreg_lc_aux_pwr_brdinfo[] = …;
static struct i2c_board_info mlxreg_lc_main_pwr_devices[] = …;
static struct mlxreg_hotplug_device mlxreg_lc_main_pwr_brdinfo[] = …;
static struct mlxreg_core_data mlxreg_lc_led_data[] = …;
static struct mlxreg_core_platform_data mlxreg_lc_led = …;
static struct mlxreg_core_data mlxreg_lc_io_data[] = …;
static struct mlxreg_core_platform_data mlxreg_lc_regs_io = …;
static int
mlxreg_lc_create_static_devices(struct mlxreg_lc *mlxreg_lc, struct mlxreg_hotplug_device *devs,
int size)
{ … }
static void
mlxreg_lc_destroy_static_devices(struct mlxreg_lc *mlxreg_lc, struct mlxreg_hotplug_device *devs,
int size)
{ … }
static int mlxreg_lc_power_on_off(struct mlxreg_lc *mlxreg_lc, u8 action)
{ … }
static int mlxreg_lc_enable_disable(struct mlxreg_lc *mlxreg_lc, bool action)
{ … }
static int
mlxreg_lc_sn4800_c16_config_init(struct mlxreg_lc *mlxreg_lc, void *regmap,
struct mlxreg_core_data *data)
{ … }
static void
mlxreg_lc_state_update(struct mlxreg_lc *mlxreg_lc, enum mlxreg_lc_state state, u8 action)
{ … }
static void
mlxreg_lc_state_update_locked(struct mlxreg_lc *mlxreg_lc, enum mlxreg_lc_state state, u8 action)
{ … }
static int mlxreg_lc_event_handler(void *handle, enum mlxreg_hotplug_kind kind, u8 action)
{ … }
static int mlxreg_lc_completion_notify(void *handle, struct i2c_adapter *parent,
struct i2c_adapter *adapters[])
{ … }
static int
mlxreg_lc_config_init(struct mlxreg_lc *mlxreg_lc, void *regmap,
struct mlxreg_core_data *data)
{ … }
static void mlxreg_lc_config_exit(struct mlxreg_lc *mlxreg_lc)
{ … }
static int mlxreg_lc_probe(struct platform_device *pdev)
{ … }
static void mlxreg_lc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver mlxreg_lc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;