linux/drivers/media/i2c/lm3560.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/i2c/lm3560.c
 * General device driver for TI lm3559, lm3560, FLASH LED Driver
 *
 * Copyright (C) 2013 Texas Instruments
 *
 * Contact: Daniel Jeong <[email protected]>
 *			Ldd-Mlp <[email protected]>
 */

#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>

/* registers definitions */
#define REG_ENABLE
#define REG_TORCH_BR
#define REG_FLASH_BR
#define REG_FLASH_TOUT
#define REG_FLAG
#define REG_CONFIG1

/* fault mask */
#define FAULT_TIMEOUT
#define FAULT_OVERTEMP
#define FAULT_SHORT_CIRCUIT

enum led_enable {};

/**
 * struct lm3560_flash
 *
 * @dev: pointer to &struct device
 * @pdata: platform data
 * @regmap: reg. map for i2c
 * @lock: muxtex for serial access.
 * @led_mode: V4L2 LED mode
 * @ctrls_led: V4L2 controls
 * @subdev_led: V4L2 subdev
 */
struct lm3560_flash {};

#define to_lm3560_flash(_ctrl, _no)

/* enable mode control */
static int lm3560_mode_ctrl(struct lm3560_flash *flash)
{}

/* led1/2 enable/disable */
static int lm3560_enable_ctrl(struct lm3560_flash *flash,
			      enum lm3560_led_id led_no, bool on)
{}

/* torch1/2 brightness control */
static int lm3560_torch_brt_ctrl(struct lm3560_flash *flash,
				 enum lm3560_led_id led_no, unsigned int brt)
{}

/* flash1/2 brightness control */
static int lm3560_flash_brt_ctrl(struct lm3560_flash *flash,
				 enum lm3560_led_id led_no, unsigned int brt)
{}

/* v4l2 controls  */
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)
{}

/* initialize device */
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();