linux/drivers/media/i2c/adp1653.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/i2c/adp1653.c
 *
 * Copyright (C) 2008--2011 Nokia Corporation
 *
 * Contact: Sakari Ailus <[email protected]>
 *
 * Contributors:
 *	Sakari Ailus <[email protected]>
 *	Tuukka Toivonen <[email protected]>
 *	Pavel Machek <[email protected]>
 *
 * TODO:
 * - fault interrupt handling
 * - hardware strobe
 * - power doesn't need to be ON if all lights are off
 */

#include <linux/delay.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <media/i2c/adp1653.h>
#include <media/v4l2-device.h>

#define TIMEOUT_MAX
#define TIMEOUT_STEP
#define TIMEOUT_MIN
#define TIMEOUT_US_TO_CODE(t)
#define TIMEOUT_CODE_TO_US(c)

/* Write values into ADP1653 registers. */
static int adp1653_update_hw(struct adp1653_flash *flash)
{}

static int adp1653_get_fault(struct adp1653_flash *flash)
{}

static int adp1653_strobe(struct adp1653_flash *flash, int enable)
{}

/* --------------------------------------------------------------------------
 * V4L2 controls
 */

static int adp1653_get_ctrl(struct v4l2_ctrl *ctrl)
{}

static int adp1653_set_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops adp1653_ctrl_ops =;

static int adp1653_init_controls(struct adp1653_flash *flash)
{}

/* --------------------------------------------------------------------------
 * V4L2 subdev operations
 */

static int
adp1653_init_device(struct adp1653_flash *flash)
{}

static int
__adp1653_set_power(struct adp1653_flash *flash, int on)
{}

static int
adp1653_set_power(struct v4l2_subdev *subdev, int on)
{}

static int adp1653_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{}

static int adp1653_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{}

static const struct v4l2_subdev_core_ops adp1653_core_ops =;

static const struct v4l2_subdev_ops adp1653_ops =;

static const struct v4l2_subdev_internal_ops adp1653_internal_ops =;

/* --------------------------------------------------------------------------
 * I2C driver
 */
#ifdef CONFIG_PM

static int adp1653_suspend(struct device *dev)
{}

static int adp1653_resume(struct device *dev)
{}

#else

#define adp1653_suspend
#define adp1653_resume

#endif /* CONFIG_PM */

static int adp1653_of_init(struct i2c_client *client,
			   struct adp1653_flash *flash,
			   struct device_node *node)
{}


static int adp1653_probe(struct i2c_client *client)
{}

static void adp1653_remove(struct i2c_client *client)
{}

static const struct i2c_device_id adp1653_id_table[] =;
MODULE_DEVICE_TABLE(i2c, adp1653_id_table);

static const struct dev_pm_ops adp1653_pm_ops =;

static struct i2c_driver adp1653_i2c_driver =;

module_i2c_driver();

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