linux/drivers/media/i2c/rdacm20.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * IMI RDACM20 GMSL Camera Driver
 *
 * Copyright (C) 2017-2020 Jacopo Mondi
 * Copyright (C) 2017-2020 Kieran Bingham
 * Copyright (C) 2017-2019 Laurent Pinchart
 * Copyright (C) 2017-2019 Niklas Söderlund
 * Copyright (C) 2016 Renesas Electronics Corporation
 * Copyright (C) 2015 Cogent Embedded, Inc.
 */

/*
 * The camera is made of an Omnivision OV10635 sensor connected to a Maxim
 * MAX9271 GMSL serializer.
 */

#include <linux/delay.h>
#include <linux/fwnode.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/videodev2.h>

#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>

#include "max9271.h"

#define OV10635_I2C_ADDRESS

#define OV10635_SOFTWARE_RESET
#define OV10635_PID
#define OV10635_VER
#define OV10635_SC_CMMN_SCCB_ID
#define OV10635_SC_CMMN_SCCB_ID_SELECT
#define OV10635_VERSION

#define OV10635_WIDTH
#define OV10635_HEIGHT

/* VTS = PCLK / FPS / HTS / 2 (= 88MHz / 1572 / 30 / 2) */
#define OV10635_HTS
/* FPS = 29,9998 */
#define OV10635_VTS

/*
 * As the drivers supports a single MEDIA_BUS_FMT_UYVY8_1X16 format we
 * can harcode the pixel rate.
 *
 * PCLK is fed through the system clock, programmed @88MHz.
 * MEDIA_BUS_FMT_UYVY8_1X16 format = 2 samples per pixel.
 *
 * Pixelrate = PCLK / 2
 * FPS = (OV10635_VTS * OV10635_HTS) / PixelRate
 *     = 29,9998
 */
#define OV10635_PIXEL_RATE

static const struct ov10635_reg {} ov10635_regs_wizard[] =;

struct rdacm20_device {};

static inline struct rdacm20_device *sd_to_rdacm20(struct v4l2_subdev *sd)
{}

static inline struct rdacm20_device *i2c_to_rdacm20(struct i2c_client *client)
{}

static int ov10635_read16(struct rdacm20_device *dev, u16 reg)
{}

static int __ov10635_write(struct rdacm20_device *dev, u16 reg, u8 val)
{}

static int ov10635_write(struct rdacm20_device *dev, u16 reg, u8 val)
{}

static int ov10635_set_regs(struct rdacm20_device *dev,
			    const struct ov10635_reg *regs,
			    unsigned int nr_regs)
{}

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

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

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

static const struct v4l2_subdev_video_ops rdacm20_video_ops =;

static const struct v4l2_subdev_pad_ops rdacm20_subdev_pad_ops =;

static const struct v4l2_subdev_ops rdacm20_subdev_ops =;

static int rdacm20_initialize(struct rdacm20_device *dev)
{}

static int rdacm20_probe(struct i2c_client *client)
{}

static void rdacm20_remove(struct i2c_client *client)
{}

static void rdacm20_shutdown(struct i2c_client *client)
{}

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

static struct i2c_driver rdacm20_i2c_driver =;

module_i2c_driver();

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