#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.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/gpio/consumer.h>
#include <linux/pwm.h>
#include <linux/platform_data/lm3630a_bl.h>
#define REG_CTRL …
#define REG_BOOST …
#define REG_CONFIG …
#define REG_BRT_A …
#define REG_BRT_B …
#define REG_I_A …
#define REG_I_B …
#define REG_INT_STATUS …
#define REG_INT_EN …
#define REG_FAULT …
#define REG_PWM_OUTLOW …
#define REG_PWM_OUTHIGH …
#define REG_FILTER_STRENGTH …
#define REG_MAX …
#define INT_DEBOUNCE_MSEC …
#define LM3630A_BANK_0 …
#define LM3630A_BANK_1 …
#define LM3630A_NUM_SINKS …
#define LM3630A_SINK_0 …
#define LM3630A_SINK_1 …
struct lm3630a_chip { … };
static int lm3630a_read(struct lm3630a_chip *pchip, unsigned int reg)
{ … }
static int lm3630a_write(struct lm3630a_chip *pchip,
unsigned int reg, unsigned int data)
{ … }
static int lm3630a_update(struct lm3630a_chip *pchip,
unsigned int reg, unsigned int mask,
unsigned int data)
{ … }
static int lm3630a_chip_init(struct lm3630a_chip *pchip)
{ … }
static void lm3630a_delayed_func(struct work_struct *work)
{ … }
static irqreturn_t lm3630a_isr_func(int irq, void *chip)
{ … }
static int lm3630a_intr_config(struct lm3630a_chip *pchip)
{ … }
static int lm3630a_pwm_ctrl(struct lm3630a_chip *pchip, int br, int br_max)
{ … }
static int lm3630a_bank_a_update_status(struct backlight_device *bl)
{ … }
static int lm3630a_bank_a_get_brightness(struct backlight_device *bl)
{ … }
static const struct backlight_ops lm3630a_bank_a_ops = …;
static int lm3630a_bank_b_update_status(struct backlight_device *bl)
{ … }
static int lm3630a_bank_b_get_brightness(struct backlight_device *bl)
{ … }
static const struct backlight_ops lm3630a_bank_b_ops = …;
static int lm3630a_backlight_register(struct lm3630a_chip *pchip)
{ … }
static const struct regmap_config lm3630a_regmap = …;
static int lm3630a_parse_led_sources(struct fwnode_handle *node,
int default_led_sources)
{ … }
static int lm3630a_parse_bank(struct lm3630a_platform_data *pdata,
struct fwnode_handle *node, int *seen_led_sources)
{ … }
static int lm3630a_parse_node(struct lm3630a_chip *pchip,
struct lm3630a_platform_data *pdata)
{ … }
static int lm3630a_probe(struct i2c_client *client)
{ … }
static void lm3630a_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm3630a_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm3630a_id);
static const struct of_device_id lm3630a_match_table[] = …;
MODULE_DEVICE_TABLE(of, lm3630a_match_table);
static struct i2c_driver lm3630a_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;