linux/drivers/media/i2c/lm3646.c

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

#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/regmap.h>
#include <linux/videodev2.h>
#include <media/i2c/lm3646.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_STROBE_SRC
#define REG_LED1_FLASH_BR
#define REG_LED1_TORCH_BR

#define MASK_ENABLE
#define MASK_TORCH_BR
#define MASK_FLASH_BR
#define MASK_FLASH_TOUT
#define MASK_FLAG
#define MASK_STROBE_SRC

/* Fault Mask */
#define FAULT_TIMEOUT
#define FAULT_SHORT_CIRCUIT
#define FAULT_UVLO
#define FAULT_IVFM
#define FAULT_OCP
#define FAULT_OVERTEMP
#define FAULT_NTC_TRIP
#define FAULT_OVP

enum led_mode {};

/*
 * struct lm3646_flash
 *
 * @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
 * @mode_reg : mode register value
 */
struct lm3646_flash {};

#define to_lm3646_flash(_ctrl)

/* enable mode control */
static int lm3646_mode_ctrl(struct lm3646_flash *flash,
			    enum v4l2_flash_led_mode led_mode)
{}

/* V4L2 controls  */
static int lm3646_get_ctrl(struct v4l2_ctrl *ctrl)
{}

static int lm3646_set_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops lm3646_led_ctrl_ops =;

static int lm3646_init_controls(struct lm3646_flash *flash)
{}

/* initialize device */
static const struct v4l2_subdev_ops lm3646_ops =;

static const struct regmap_config lm3646_regmap =;

static int lm3646_subdev_init(struct lm3646_flash *flash)
{}

static int lm3646_init_device(struct lm3646_flash *flash)
{}

static int lm3646_probe(struct i2c_client *client)
{}

static void lm3646_remove(struct i2c_client *client)
{}

static const struct i2c_device_id lm3646_id_table[] =;

MODULE_DEVICE_TABLE(i2c, lm3646_id_table);

static struct i2c_driver lm3646_i2c_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();