#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/regmap.h>
#include <linux/platform_data/leds-lm355x.h>
enum lm355x_type { … };
enum lm355x_regs { … };
enum lm355x_mode { … };
struct lm355x_reg_data { … };
struct lm355x_chip_data { … };
enum lm3556_indic_pulse_time { … };
enum lm3556_indic_n_blank { … };
enum lm3556_indic_period { … };
#define INDIC_PATTERN_SIZE …
struct indicator { … };
static struct indicator indicator_pattern[INDIC_PATTERN_SIZE] = …;
static struct lm355x_reg_data lm3554_regs[REG_MAX] = …;
static struct lm355x_reg_data lm3556_regs[REG_MAX] = …;
static char lm355x_name[][I2C_NAME_SIZE] = …;
static int lm355x_chip_init(struct lm355x_chip_data *chip)
{ … }
static int lm355x_control(struct lm355x_chip_data *chip,
u8 brightness, enum lm355x_mode opmode)
{ … }
static int lm355x_torch_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static int lm355x_strobe_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static int lm355x_indicator_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static ssize_t pattern_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{ … }
static DEVICE_ATTR_WO(pattern);
static struct attribute *lm355x_indicator_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct regmap_config lm355x_regmap = …;
static int lm355x_probe(struct i2c_client *client)
{ … }
static void lm355x_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm355x_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm355x_id);
static struct i2c_driver lm355x_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;