#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#define LM3509_NAME …
#define LM3509_SINK_MAIN …
#define LM3509_SINK_SUB …
#define LM3509_NUM_SINKS …
#define LM3509_DEF_BRIGHTNESS …
#define LM3509_MAX_BRIGHTNESS …
#define REG_GP …
#define REG_BMAIN …
#define REG_BSUB …
#define REG_MAX …
enum { … };
struct lm3509_bl { … };
struct lm3509_bl_led_data { … };
static void lm3509_reset(struct lm3509_bl *data)
{ … }
static int lm3509_update_status(struct backlight_device *bl,
unsigned int en_mask, unsigned int br_reg)
{ … }
static int lm3509_main_update_status(struct backlight_device *bl)
{ … }
static const struct backlight_ops lm3509_main_ops = …;
static int lm3509_sub_update_status(struct backlight_device *bl)
{ … }
static const struct backlight_ops lm3509_sub_ops = …;
static struct backlight_device *
lm3509_backlight_register(struct device *dev, const char *name_suffix,
struct lm3509_bl *data,
const struct backlight_ops *ops,
const struct lm3509_bl_led_data *led_data)
{ … }
static const struct regmap_config lm3509_regmap = …;
static int lm3509_parse_led_sources(struct device_node *node,
int default_led_sources)
{ … }
static int lm3509_parse_dt_node(struct device *dev,
struct lm3509_bl_led_data *led_data)
{ … }
static int lm3509_probe(struct i2c_client *client)
{ … }
static void lm3509_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm3509_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm3509_id);
static const struct of_device_id lm3509_match_table[] = …;
MODULE_DEVICE_TABLE(of, lm3509_match_table);
static struct i2c_driver lm3509_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;