linux/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Support for GalaxyCore GC0310 VGA camera sensor.
 *
 * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
 * Copyright (c) 2023 Hans de Goede <[email protected]>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version
 * 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/string.h>
#include <linux/types.h>

#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>

#define GC0310_NATIVE_WIDTH
#define GC0310_NATIVE_HEIGHT

#define GC0310_FPS
#define GC0310_SKIP_FRAMES

#define GC0310_FOCAL_LENGTH_NUM

#define GC0310_ID

#define GC0310_RESET_RELATED
#define GC0310_REGISTER_PAGE_0
#define GC0310_REGISTER_PAGE_3

/*
 * GC0310 System control registers
 */
#define GC0310_SW_STREAM

#define GC0310_SC_CMMN_CHIP_ID_H
#define GC0310_SC_CMMN_CHIP_ID_L

#define GC0310_AEC_PK_EXPO_H
#define GC0310_AEC_PK_EXPO_L
#define GC0310_AGC_ADJ
#define GC0310_DGC_ADJ
#define GC0310_GROUP_ACCESS

#define GC0310_H_CROP_START_H
#define GC0310_H_CROP_START_L
#define GC0310_V_CROP_START_H
#define GC0310_V_CROP_START_L
#define GC0310_H_OUTSIZE_H
#define GC0310_H_OUTSIZE_L
#define GC0310_V_OUTSIZE_H
#define GC0310_V_OUTSIZE_L
#define GC0310_H_BLANKING_H
#define GC0310_H_BLANKING_L
#define GC0310_V_BLANKING_H
#define GC0310_V_BLANKING_L
#define GC0310_SH_DELAY

#define GC0310_START_STREAMING
#define GC0310_STOP_STREAMING

#define to_gc0310_sensor(x)

struct gc0310_device {};

struct gc0310_reg {};

static const struct gc0310_reg gc0310_reset_register[] =;

static const struct gc0310_reg gc0310_VGA_30fps[] =;

/*
 * gc0310_write_reg_array - Initializes a list of GC0310 registers
 * @client: i2c driver client structure
 * @reglist: list of registers to be written
 * @count: number of register, value pairs in the list
 */
static int gc0310_write_reg_array(struct i2c_client *client,
				  const struct gc0310_reg *reglist, int count)
{}

static int gc0310_exposure_set(struct gc0310_device *dev, u32 exp)
{}

static int gc0310_gain_set(struct gc0310_device *dev, u32 gain)
{}

static int gc0310_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops ctrl_ops =;

static struct v4l2_mbus_framefmt *
gc0310_get_pad_format(struct gc0310_device *dev,
		      struct v4l2_subdev_state *state,
		      unsigned int pad, enum v4l2_subdev_format_whence which)
{}

/* The GC0310 currently only supports 1 fixed fmt */
static void gc0310_fill_format(struct v4l2_mbus_framefmt *fmt)
{}

static int gc0310_set_fmt(struct v4l2_subdev *sd,
			  struct v4l2_subdev_state *sd_state,
			  struct v4l2_subdev_format *format)
{}

static int gc0310_get_fmt(struct v4l2_subdev *sd,
			  struct v4l2_subdev_state *sd_state,
			  struct v4l2_subdev_format *format)
{}

static int gc0310_detect(struct i2c_client *client)
{}

static int gc0310_s_stream(struct v4l2_subdev *sd, int enable)
{}

static int gc0310_get_frame_interval(struct v4l2_subdev *sd,
				     struct v4l2_subdev_state *sd_state,
				     struct v4l2_subdev_frame_interval *interval)
{}

static int gc0310_enum_mbus_code(struct v4l2_subdev *sd,
				 struct v4l2_subdev_state *sd_state,
				 struct v4l2_subdev_mbus_code_enum *code)
{}

static int gc0310_enum_frame_size(struct v4l2_subdev *sd,
				  struct v4l2_subdev_state *sd_state,
				  struct v4l2_subdev_frame_size_enum *fse)
{}

static int gc0310_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
{}

static const struct v4l2_subdev_sensor_ops gc0310_sensor_ops =;

static const struct v4l2_subdev_video_ops gc0310_video_ops =;

static const struct v4l2_subdev_pad_ops gc0310_pad_ops =;

static const struct v4l2_subdev_ops gc0310_ops =;

static int gc0310_init_controls(struct gc0310_device *dev)
{}

static void gc0310_remove(struct i2c_client *client)
{}

static int gc0310_probe(struct i2c_client *client)
{}

static int gc0310_suspend(struct device *dev)
{}

static int gc0310_resume(struct device *dev)
{}

static DEFINE_RUNTIME_DEV_PM_OPS(gc0310_pm_ops, gc0310_suspend, gc0310_resume, NULL);

static const struct acpi_device_id gc0310_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, gc0310_acpi_match);

static struct i2c_driver gc0310_driver =;
module_i2c_driver();

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