linux/drivers/media/i2c/s5c73m3/s5c73m3-core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Samsung LSI S5C73M3 8M pixel camera driver
 *
 * Copyright (C) 2012, Samsung Electronics, Co., Ltd.
 * Sylwester Nawrocki <[email protected]>
 * Andrzej Hajda <[email protected]>
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/media.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/regulator/consumer.h>
#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/videodev2.h>
#include <media/media-entity.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-mediabus.h>
#include <media/v4l2-fwnode.h>

#include "s5c73m3.h"

int s5c73m3_dbg;
module_param_named(debug, s5c73m3_dbg, int, 0644);

static int boot_from_rom =;
module_param(boot_from_rom, int, 0644);

static int update_fw;
module_param(update_fw, int, 0644);

#define S5C73M3_EMBEDDED_DATA_MAXLEN
#define S5C73M3_MIPI_DATA_LANES
#define S5C73M3_CLK_NAME

static const char * const s5c73m3_supply_names[S5C73M3_MAX_SUPPLIES] =;

static const struct s5c73m3_frame_size s5c73m3_isp_resolutions[] =;

static const struct s5c73m3_frame_size s5c73m3_jpeg_resolutions[] =;

static const struct s5c73m3_frame_size * const s5c73m3_resolutions[] =;

static const int s5c73m3_resolutions_len[] =;

static const struct s5c73m3_interval s5c73m3_intervals[] =;

#define S5C73M3_DEFAULT_FRAME_INTERVAL

static void s5c73m3_fill_mbus_fmt(struct v4l2_mbus_framefmt *mf,
				  const struct s5c73m3_frame_size *fs,
				  u32 code)
{}

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

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

int s5c73m3_write(struct s5c73m3 *state, u32 addr, u16 data)
{}

int s5c73m3_read(struct s5c73m3 *state, u32 addr, u16 *data)
{}

static int s5c73m3_check_status(struct s5c73m3 *state, unsigned int value)
{}

int s5c73m3_isp_command(struct s5c73m3 *state, u16 command, u16 data)
{}

static int s5c73m3_isp_comm_result(struct s5c73m3 *state, u16 command,
				   u16 *data)
{}

static int s5c73m3_set_af_softlanding(struct s5c73m3 *state)
{}

static int s5c73m3_load_fw(struct v4l2_subdev *sd)
{}

static int s5c73m3_set_frame_size(struct s5c73m3 *state)
{}

static int s5c73m3_set_frame_rate(struct s5c73m3 *state)
{}

static int __s5c73m3_s_stream(struct s5c73m3 *state, struct v4l2_subdev *sd,
								int on)
{}

static int s5c73m3_oif_s_stream(struct v4l2_subdev *sd, int on)
{}

static int s5c73m3_system_status_wait(struct s5c73m3 *state, u32 value,
				      unsigned int delay, unsigned int steps)
{}

static int s5c73m3_read_fw_version(struct s5c73m3 *state)
{}

static int s5c73m3_fw_update_from(struct s5c73m3 *state)
{}

static int s5c73m3_spi_boot(struct s5c73m3 *state, bool load_fw)
{}

static int s5c73m3_set_timing_register_for_vdd(struct s5c73m3 *state)
{}

static void s5c73m3_set_fw_file_version(struct s5c73m3 *state)
{}

static int s5c73m3_get_fw_version(struct s5c73m3 *state)
{}

static int s5c73m3_rom_boot(struct s5c73m3 *state, bool load_fw)
{}

static int s5c73m3_isp_init(struct s5c73m3 *state)
{}

static const struct s5c73m3_frame_size *s5c73m3_find_frame_size(
					struct v4l2_mbus_framefmt *fmt,
					enum s5c73m3_resolution_types idx)
{}

static void s5c73m3_oif_try_format(struct s5c73m3 *state,
				   struct v4l2_subdev_state *sd_state,
				   struct v4l2_subdev_format *fmt,
				   const struct s5c73m3_frame_size **fs)
{}

static void s5c73m3_try_format(struct s5c73m3 *state,
			      struct v4l2_subdev_state *sd_state,
			      struct v4l2_subdev_format *fmt,
			      const struct s5c73m3_frame_size **fs)
{}

static int s5c73m3_oif_get_frame_interval(struct v4l2_subdev *sd,
					  struct v4l2_subdev_state *sd_state,
					  struct v4l2_subdev_frame_interval *fi)
{}

static int __s5c73m3_set_frame_interval(struct s5c73m3 *state,
					struct v4l2_subdev_frame_interval *fi)
{}

static int s5c73m3_oif_set_frame_interval(struct v4l2_subdev *sd,
					  struct v4l2_subdev_state *sd_state,
					  struct v4l2_subdev_frame_interval *fi)
{}

static int s5c73m3_oif_enum_frame_interval(struct v4l2_subdev *sd,
			      struct v4l2_subdev_state *sd_state,
			      struct v4l2_subdev_frame_interval_enum *fie)
{}

static int s5c73m3_oif_get_pad_code(int pad, int index)
{}

static int s5c73m3_get_fmt(struct v4l2_subdev *sd,
			   struct v4l2_subdev_state *sd_state,
			   struct v4l2_subdev_format *fmt)
{}

static int s5c73m3_oif_get_fmt(struct v4l2_subdev *sd,
			   struct v4l2_subdev_state *sd_state,
			   struct v4l2_subdev_format *fmt)
{}

static int s5c73m3_set_fmt(struct v4l2_subdev *sd,
			   struct v4l2_subdev_state *sd_state,
			   struct v4l2_subdev_format *fmt)
{}

static int s5c73m3_oif_set_fmt(struct v4l2_subdev *sd,
			 struct v4l2_subdev_state *sd_state,
			 struct v4l2_subdev_format *fmt)
{}

static int s5c73m3_oif_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
				  struct v4l2_mbus_frame_desc *fd)
{}

static int s5c73m3_oif_set_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
				      struct v4l2_mbus_frame_desc *fd)
{}

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

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

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

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

static int s5c73m3_oif_log_status(struct v4l2_subdev *sd)
{}

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

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

static int __s5c73m3_power_on(struct s5c73m3 *state)
{}

static int __s5c73m3_power_off(struct s5c73m3 *state)
{}

static int s5c73m3_oif_set_power(struct v4l2_subdev *sd, int on)
{}

static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
{}

static void s5c73m3_oif_unregistered(struct v4l2_subdev *sd)
{}

static const struct v4l2_subdev_internal_ops s5c73m3_internal_ops =;

static const struct v4l2_subdev_pad_ops s5c73m3_pad_ops =;

static const struct v4l2_subdev_ops s5c73m3_subdev_ops =;

static const struct v4l2_subdev_internal_ops oif_internal_ops =;

static const struct v4l2_subdev_pad_ops s5c73m3_oif_pad_ops =;

static const struct v4l2_subdev_core_ops s5c73m3_oif_core_ops =;

static const struct v4l2_subdev_video_ops s5c73m3_oif_video_ops =;

static const struct v4l2_subdev_ops oif_subdev_ops =;

static int s5c73m3_get_dt_data(struct s5c73m3 *state)
{}

static int s5c73m3_probe(struct i2c_client *client)
{}

static void s5c73m3_remove(struct i2c_client *client)
{}

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

#ifdef CONFIG_OF
static const struct of_device_id s5c73m3_of_match[] =;
MODULE_DEVICE_TABLE(of, s5c73m3_of_match);
#endif

static struct i2c_driver s5c73m3_i2c_driver =;

module_i2c_driver();

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