#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/vmalloc.h>
#include <linux/v4l2-mediabus.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-subdev.h>
#include "vimc-common.h"
#define VIMC_DEBAYER_SOURCE_MBUS_FMT …
enum vimc_debayer_rgb_colors { … };
struct vimc_debayer_pix_map { … };
struct vimc_debayer_device { … };
static const struct v4l2_mbus_framefmt sink_fmt_default = …;
static const u32 vimc_debayer_src_mbus_codes[] = …;
static const struct vimc_debayer_pix_map vimc_debayer_pix_map_list[] = …;
static const struct vimc_debayer_pix_map *vimc_debayer_pix_map_by_code(u32 code)
{ … }
static bool vimc_debayer_src_code_is_valid(u32 code)
{ … }
static int vimc_debayer_init_state(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state)
{ … }
static int vimc_debayer_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int vimc_debayer_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static void vimc_debayer_adjust_sink_fmt(struct v4l2_mbus_framefmt *fmt)
{ … }
static int vimc_debayer_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static const struct v4l2_subdev_pad_ops vimc_debayer_pad_ops = …;
static void vimc_debayer_process_rgb_frame(struct vimc_debayer_device *vdebayer,
unsigned int lin,
unsigned int col,
unsigned int rgb[3])
{ … }
static int vimc_debayer_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static const struct v4l2_subdev_core_ops vimc_debayer_core_ops = …;
static const struct v4l2_subdev_video_ops vimc_debayer_video_ops = …;
static const struct v4l2_subdev_ops vimc_debayer_ops = …;
static const struct v4l2_subdev_internal_ops vimc_debayer_internal_ops = …;
static unsigned int vimc_debayer_get_val(const u8 *bytes,
const unsigned int n_bytes)
{ … }
static void vimc_debayer_calc_rgb_sink(struct vimc_debayer_device *vdebayer,
const u8 *frame,
const unsigned int lin,
const unsigned int col,
unsigned int rgb[3])
{ … }
static void *vimc_debayer_process_frame(struct vimc_ent_device *ved,
const void *sink_frame)
{ … }
static int vimc_debayer_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops vimc_debayer_ctrl_ops = …;
static void vimc_debayer_release(struct vimc_ent_device *ved)
{ … }
static const struct v4l2_ctrl_config vimc_debayer_ctrl_class = …;
static const struct v4l2_ctrl_config vimc_debayer_ctrl_mean_win_size = …;
static struct vimc_ent_device *vimc_debayer_add(struct vimc_device *vimc,
const char *vcfg_name)
{ … }
const struct vimc_ent_type vimc_debayer_type = …;