#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/backlight.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/platform_data/lm3639_bl.h>
#define REG_DEV_ID …
#define REG_CHECKSUM …
#define REG_BL_CONF_1 …
#define REG_BL_CONF_2 …
#define REG_BL_CONF_3 …
#define REG_BL_CONF_4 …
#define REG_FL_CONF_1 …
#define REG_FL_CONF_2 …
#define REG_FL_CONF_3 …
#define REG_IO_CTRL …
#define REG_ENABLE …
#define REG_FLAG …
#define REG_MAX …
struct lm3639_chip_data { … };
static int lm3639_chip_init(struct lm3639_chip_data *pchip)
{ … }
static int lm3639_bled_update_status(struct backlight_device *bl)
{ … }
static int lm3639_bled_get_brightness(struct backlight_device *bl)
{ … }
static const struct backlight_ops lm3639_bled_ops = …;
static ssize_t lm3639_bled_mode_store(struct device *dev,
struct device_attribute *devAttr,
const char *buf, size_t size)
{ … }
static DEVICE_ATTR(bled_mode, S_IWUSR, NULL, lm3639_bled_mode_store);
static void lm3639_torch_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static void lm3639_flash_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static const struct regmap_config lm3639_regmap = …;
static int lm3639_probe(struct i2c_client *client)
{ … }
static void lm3639_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm3639_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm3639_id);
static struct i2c_driver lm3639_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;