linux/drivers/media/i2c/tw2804.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2005-2006 Micronas USA Inc.
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <linux/ioctl.h>
#include <linux/slab.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>

#define TW2804_REG_AUTOGAIN
#define TW2804_REG_HUE
#define TW2804_REG_SATURATION
#define TW2804_REG_CONTRAST
#define TW2804_REG_BRIGHTNESS
#define TW2804_REG_COLOR_KILLER
#define TW2804_REG_GAIN
#define TW2804_REG_CHROMA_GAIN
#define TW2804_REG_BLUE_BALANCE
#define TW2804_REG_RED_BALANCE

struct tw2804 {};

static const u8 global_registers[] =;

static const u8 channel_registers[] =;

static int write_reg(struct i2c_client *client, u8 reg, u8 value, u8 channel)
{}

static int write_regs(struct i2c_client *client, const u8 *regs, u8 channel)
{}

static int read_reg(struct i2c_client *client, u8 reg, u8 channel)
{}

static inline struct tw2804 *to_state(struct v4l2_subdev *sd)
{}

static inline struct tw2804 *to_state_from_ctrl(struct v4l2_ctrl *ctrl)
{}

static int tw2804_log_status(struct v4l2_subdev *sd)
{}

/*
 * These volatile controls are needed because all four channels share
 * these controls. So a change made to them through one channel would
 * require another channel to be updated.
 *
 * Normally this would have been done in a different way, but since the one
 * board that uses this driver sees this single chip as if it was on four
 * different i2c adapters (each adapter belonging to a separate instance of
 * the same USB driver) there is no reliable method that I have found to let
 * the instances know about each other.
 *
 * So implementing these global registers as volatile is the best we can do.
 */
static int tw2804_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{}

static int tw2804_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static int tw2804_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
{}

static int tw2804_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
	u32 config)
{}

static const struct v4l2_ctrl_ops tw2804_ctrl_ops =;

static const struct v4l2_subdev_video_ops tw2804_video_ops =;

static const struct v4l2_subdev_core_ops tw2804_core_ops =;

static const struct v4l2_subdev_ops tw2804_ops =;

static int tw2804_probe(struct i2c_client *client)
{}

static void tw2804_remove(struct i2c_client *client)
{}

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

static struct i2c_driver tw2804_driver =;

module_i2c_driver();

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