// SPDX-License-Identifier: GPL-2.0/* * ov772x Camera Driver * * Copyright (C) 2017 Jacopo Mondi <jacopo+renesas@jmondi.org> * * Copyright (C) 2008 Renesas Solutions Corp. * Kuninori Morimoto <morimoto.kuninori@renesas.com> * * Based on ov7670 and soc_camera_platform driver, * * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net> * Copyright (C) 2008 Magnus Damm * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> */#include<linux/clk.h>#include<linux/delay.h>#include<linux/gpio/consumer.h>#include<linux/i2c.h>#include<linux/init.h>#include<linux/kernel.h>#include<linux/module.h>#include<linux/regmap.h>#include<linux/slab.h>#include<linux/v4l2-mediabus.h>#include<linux/videodev2.h>#include<media/i2c/ov772x.h>#include<media/v4l2-ctrls.h>#include<media/v4l2-device.h>#include<media/v4l2-event.h>#include<media/v4l2-image-sizes.h>#include<media/v4l2-subdev.h>/* * register offset */#define GAIN 0x00 /* AGC - Gain control gain setting */#define BLUE 0x01 /* AWB - Blue channel gain setting */#define RED 0x02 /* AWB - Red channel gain setting */#define GREEN 0x03 /* AWB - Green channel gain setting */#define COM1 0x04 /* Common control 1 */#define BAVG 0x05 /* U/B Average Level */#define GAVG 0x06 /* Y/Gb Average Level */#define RAVG 0x07 /* V/R Average Level */#define AECH 0x08 /* Exposure Value - AEC MSBs */#define COM2 0x09 /* Common control 2 */#define PID 0x0A /* Product ID Number MSB */#define VER 0x0B /* Product ID Number LSB */#define COM3 0x0C /* Common control 3 */#define COM4 0x0D /* Common control 4 */#define COM5 0x0E /* Common control 5 */#define COM6 0x0F /* Common control 6 */#define AEC 0x10 /* Exposure Value */#define CLKRC 0x11 /* Internal clock */