/* * SoC-camera host driver for Renesas R-Car VIN unit * * Copyright (C) 2011-2013 Renesas Solutions Corp. * Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com> * * Based on V4L2 Driver for SuperH Mobile CEU interface "sh_mobile_ceu_camera.c" * * Copyright (C) 2008 Magnus Damm * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */#include<linux/delay.h>#include<linux/interrupt.h>#include<linux/io.h>#include<linux/kernel.h>#include<linux/module.h>#include<linux/platform_data/camera-rcar.h>#include<linux/platform_device.h>#include<linux/pm_runtime.h>#include<linux/slab.h>#include<linux/videodev2.h>#include<media/soc_camera.h>#include<media/soc_mediabus.h>#include<media/v4l2-common.h>#include<media/v4l2-dev.h>#include<media/v4l2-device.h>#include<media/v4l2-mediabus.h>#include<media/v4l2-subdev.h>#include<media/videobuf2-dma-contig.h>#include"soc_scale_crop.h"#define DRV_NAME "rcar_vin"/* Register offsets for R-Car VIN */#define VNMC_REG 0x00 /* Video n Main Control Register */#define VNMS_REG 0x04 /* Video n Module Status Register */#define VNFC_REG 0x08 /* Video n Frame Capture Register */#define VNSLPRC_REG 0x0C /* Video n Start Line Pre-Clip Register */#define VNELPRC_REG 0x10 /* Video n End Line Pre-Clip Register */#define VNSPPRC_REG 0x14 /* Video n Start Pixel Pre-Clip Register */#define VNEPPRC_REG 0x18 /* Video n End Pixel Pre-Clip Register */#define VNSLPOC_REG 0x1C /* Video n Start Line Post-Clip Register */#define VNELPOC_REG 0x20 /* Video n End Line Post-Clip Register */#define VNSPPOC_REG 0x2