linux/drivers/media/i2c/dw9714.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2015--2017 Intel Corporation.

#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>

#define DW9714_NAME
#define DW9714_MAX_FOCUS_POS
/*
 * This sets the minimum granularity for the focus positions.
 * A value of 1 gives maximum accuracy for a desired focus position
 */
#define DW9714_FOCUS_STEPS
/*
 * This acts as the minimum granularity of lens movement.
 * Keep this value power of 2, so the control steps can be
 * uniformly adjusted for gradual lens movement, with desired
 * number of control steps.
 */
#define DW9714_CTRL_STEPS
#define DW9714_CTRL_DELAY_US
/*
 * S[3:2] = 0x00, codes per step for "Linear Slope Control"
 * S[1:0] = 0x00, step period
 */
#define DW9714_DEFAULT_S
#define DW9714_VAL(data, s)

/* dw9714 device structure */
struct dw9714_device {};

static inline struct dw9714_device *to_dw9714_vcm(struct v4l2_ctrl *ctrl)
{}

static inline struct dw9714_device *sd_to_dw9714_vcm(struct v4l2_subdev *subdev)
{}

static int dw9714_i2c_write(struct i2c_client *client, u16 data)
{}

static int dw9714_t_focus_vcm(struct dw9714_device *dw9714_dev, u16 val)
{}

static int dw9714_set_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops dw9714_vcm_ctrl_ops =;

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

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

static const struct v4l2_subdev_internal_ops dw9714_int_ops =;

static const struct v4l2_subdev_core_ops dw9714_core_ops =;

static const struct v4l2_subdev_ops dw9714_ops =;

static void dw9714_subdev_cleanup(struct dw9714_device *dw9714_dev)
{}

static int dw9714_init_controls(struct dw9714_device *dev_vcm)
{}

static int dw9714_probe(struct i2c_client *client)
{}

static void dw9714_remove(struct i2c_client *client)
{}

/*
 * This function sets the vcm position, so it consumes least current
 * The lens position is gradually moved in units of DW9714_CTRL_STEPS,
 * to make the movements smoothly.
 */
static int __maybe_unused dw9714_vcm_suspend(struct device *dev)
{}

/*
 * This function sets the vcm position to the value set by the user
 * through v4l2_ctrl_ops s_ctrl handler
 * The lens position is gradually moved in units of DW9714_CTRL_STEPS,
 * to make the movements smoothly.
 */
static int  __maybe_unused dw9714_vcm_resume(struct device *dev)
{}

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

static const struct of_device_id dw9714_of_table[] =;
MODULE_DEVICE_TABLE(of, dw9714_of_table);

static const struct dev_pm_ops dw9714_pm_ops =;

static struct i2c_driver dw9714_i2c_driver =;

module_i2c_driver();

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