#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/leds.h>
#include <linux/mutex.h>
#include <linux/leds-lp3944.h>
#define LP3944_REG_INPUT1 …
#define LP3944_REG_REGISTER1 …
#define LP3944_REG_PSC0 …
#define LP3944_REG_PWM0 …
#define LP3944_REG_PSC1 …
#define LP3944_REG_PWM1 …
#define LP3944_REG_LS0 …
#define LP3944_REG_LS1 …
#define LP3944_REG_REGISTER8 …
#define LP3944_REG_REGISTER9 …
#define LP3944_DIM0 …
#define LP3944_DIM1 …
#define LP3944_PERIOD_MIN …
#define LP3944_PERIOD_MAX …
#define LP3944_DUTY_CYCLE_MIN …
#define LP3944_DUTY_CYCLE_MAX …
#define ldev_to_led(c) …
struct lp3944_led_data { … };
struct lp3944_data { … };
static int lp3944_reg_read(struct i2c_client *client, u8 reg, u8 *value)
{ … }
static int lp3944_reg_write(struct i2c_client *client, u8 reg, u8 value)
{ … }
static int lp3944_dim_set_period(struct i2c_client *client, u8 dim, u16 period)
{ … }
static int lp3944_dim_set_dutycycle(struct i2c_client *client, u8 dim,
u8 duty_cycle)
{ … }
static int lp3944_led_set(struct lp3944_led_data *led, u8 status)
{ … }
static int lp3944_led_set_blink(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
{ … }
static int lp3944_led_set_brightness(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int lp3944_configure(struct i2c_client *client,
struct lp3944_data *data,
struct lp3944_platform_data *pdata)
{ … }
static int lp3944_probe(struct i2c_client *client)
{ … }
static void lp3944_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lp3944_id[] = …;
MODULE_DEVICE_TABLE(i2c, lp3944_id);
static struct i2c_driver lp3944_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;