#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/led-lm3530.h>
#include <linux/types.h>
#include <linux/regulator/consumer.h>
#include <linux/module.h>
#define LM3530_LED_DEV …
#define LM3530_NAME …
#define LM3530_GEN_CONFIG …
#define LM3530_ALS_CONFIG …
#define LM3530_BRT_RAMP_RATE …
#define LM3530_ALS_IMP_SELECT …
#define LM3530_BRT_CTRL_REG …
#define LM3530_ALS_ZB0_REG …
#define LM3530_ALS_ZB1_REG …
#define LM3530_ALS_ZB2_REG …
#define LM3530_ALS_ZB3_REG …
#define LM3530_ALS_Z0T_REG …
#define LM3530_ALS_Z1T_REG …
#define LM3530_ALS_Z2T_REG …
#define LM3530_ALS_Z3T_REG …
#define LM3530_ALS_Z4T_REG …
#define LM3530_REG_MAX …
#define LM3530_EN_I2C_SHIFT …
#define LM3530_RAMP_LAW_SHIFT …
#define LM3530_MAX_CURR_SHIFT …
#define LM3530_EN_PWM_SHIFT …
#define LM3530_PWM_POL_SHIFT …
#define LM3530_EN_PWM_SIMPLE_SHIFT …
#define LM3530_ENABLE_I2C …
#define LM3530_ENABLE_PWM …
#define LM3530_POL_LOW …
#define LM3530_ENABLE_PWM_SIMPLE …
#define LM3530_ALS_AVG_TIME_SHIFT …
#define LM3530_EN_ALS_SHIFT …
#define LM3530_ALS_SEL_SHIFT …
#define LM3530_ENABLE_ALS …
#define LM3530_BRT_RAMP_FALL_SHIFT …
#define LM3530_BRT_RAMP_RISE_SHIFT …
#define LM3530_ALS1_IMP_SHIFT …
#define LM3530_ALS2_IMP_SHIFT …
#define LM3530_ALS_ZB_MAX …
#define LM3530_ALS_WINDOW_mV …
#define LM3530_ALS_OFFSET_mV …
#define LM3530_DEF_ZT_0 …
#define LM3530_DEF_ZT_1 …
#define LM3530_DEF_ZT_2 …
#define LM3530_DEF_ZT_3 …
#define LM3530_DEF_ZT_4 …
#define MAX_BRIGHTNESS …
struct lm3530_mode_map { … };
static struct lm3530_mode_map mode_map[] = …;
struct lm3530_data { … };
struct lm3530_als_data { … };
static const u8 lm3530_reg[LM3530_REG_MAX] = …;
static int lm3530_get_mode_from_str(const char *str)
{ … }
static void lm3530_als_configure(struct lm3530_platform_data *pdata,
struct lm3530_als_data *als)
{ … }
static int lm3530_led_enable(struct lm3530_data *drvdata)
{ … }
static void lm3530_led_disable(struct lm3530_data *drvdata)
{ … }
static int lm3530_init_registers(struct lm3530_data *drvdata)
{ … }
static void lm3530_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brt_val)
{ … }
static ssize_t mode_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t mode_store(struct device *dev, struct device_attribute
*attr, const char *buf, size_t size)
{ … }
static DEVICE_ATTR_RW(mode);
static struct attribute *lm3530_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int lm3530_probe(struct i2c_client *client)
{ … }
static void lm3530_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm3530_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm3530_id);
static struct i2c_driver lm3530_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;