#include <linux/delay.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/videodev2.h>
#include <media/i2c/lm3560.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#define REG_ENABLE …
#define REG_TORCH_BR …
#define REG_FLASH_BR …
#define REG_FLASH_TOUT …
#define REG_FLAG …
#define REG_CONFIG1 …
#define FAULT_TIMEOUT …
#define FAULT_OVERTEMP …
#define FAULT_SHORT_CIRCUIT …
enum led_enable { … };
struct lm3560_flash { … };
#define to_lm3560_flash(_ctrl, _no) …
static int lm3560_mode_ctrl(struct lm3560_flash *flash)
{ … }
static int lm3560_enable_ctrl(struct lm3560_flash *flash,
enum lm3560_led_id led_no, bool on)
{ … }
static int lm3560_torch_brt_ctrl(struct lm3560_flash *flash,
enum lm3560_led_id led_no, unsigned int brt)
{ … }
static int lm3560_flash_brt_ctrl(struct lm3560_flash *flash,
enum lm3560_led_id led_no, unsigned int brt)
{ … }
static int lm3560_get_ctrl(struct v4l2_ctrl *ctrl, enum lm3560_led_id led_no)
{ … }
static int lm3560_set_ctrl(struct v4l2_ctrl *ctrl, enum lm3560_led_id led_no)
{ … }
static int lm3560_led1_get_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int lm3560_led1_set_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int lm3560_led0_get_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int lm3560_led0_set_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops lm3560_led_ctrl_ops[LM3560_LED_MAX] = …;
static int lm3560_init_controls(struct lm3560_flash *flash,
enum lm3560_led_id led_no)
{ … }
static const struct v4l2_subdev_ops lm3560_ops = …;
static const struct regmap_config lm3560_regmap = …;
static int lm3560_subdev_init(struct lm3560_flash *flash,
enum lm3560_led_id led_no, char *led_name)
{ … }
static int lm3560_init_device(struct lm3560_flash *flash)
{ … }
static int lm3560_probe(struct i2c_client *client)
{ … }
static void lm3560_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm3560_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, lm3560_id_table);
static struct i2c_driver lm3560_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;