linux/drivers/media/platform/microchip/microchip-sama7g5-isc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Microchip eXtended Image Sensor Controller (XISC) driver
 *
 * Copyright (C) 2019-2021 Microchip Technology, Inc. and its subsidiaries
 *
 * Author: Eugen Hristev <[email protected]>
 *
 * Sensor-->PFE-->DPC-->WB-->CFA-->CC-->GAM-->VHXS-->CSC-->CBHS-->SUB-->RLP-->DMA-->HIS
 *
 * ISC video pipeline integrates the following submodules:
 * PFE: Parallel Front End to sample the camera sensor input stream
 * DPC: Defective Pixel Correction with black offset correction, green disparity
 *      correction and defective pixel correction (3 modules total)
 *  WB: Programmable white balance in the Bayer domain
 * CFA: Color filter array interpolation module
 *  CC: Programmable color correction
 * GAM: Gamma correction
 *VHXS: Vertical and Horizontal Scaler
 * CSC: Programmable color space conversion
 *CBHS: Contrast Brightness Hue and Saturation control
 * SUB: This module performs YCbCr444 to YCbCr420 chrominance subsampling
 * RLP: This module performs rounding, range limiting
 *      and packing of the incoming data
 * DMA: This module performs DMA master accesses to write frames to external RAM
 * HIS: Histogram module performs statistic counters on the frames
 */

#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/videodev2.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-ioctl.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-dma-contig.h>

#include "microchip-isc-regs.h"
#include "microchip-isc.h"

#define ISC_SAMA7G5_MAX_SUPPORT_WIDTH
#define ISC_SAMA7G5_MAX_SUPPORT_HEIGHT

#define ISC_SAMA7G5_PIPELINE

/* This is a list of the formats that the ISC can *output* */
static const struct isc_format sama7g5_controller_formats[] =;

/* This is a list of formats that the ISC can receive as *input* */
static struct isc_format sama7g5_formats_list[] =;

static void isc_sama7g5_config_csc(struct isc_device *isc)
{}

static void isc_sama7g5_config_cbc(struct isc_device *isc)
{}

static void isc_sama7g5_config_cc(struct isc_device *isc)
{}

static void isc_sama7g5_config_ctrls(struct isc_device *isc,
				     const struct v4l2_ctrl_ops *ops)
{}

static void isc_sama7g5_config_dpc(struct isc_device *isc)
{}

static void isc_sama7g5_config_gam(struct isc_device *isc)
{}

static void isc_sama7g5_config_rlp(struct isc_device *isc)
{}

static void isc_sama7g5_adapt_pipeline(struct isc_device *isc)
{}

/* Gamma table with gamma 1/2.2 */
static const u32 isc_sama7g5_gamma_table[][GAMMA_ENTRIES] =;

static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
{}

static int microchip_xisc_probe(struct platform_device *pdev)
{}

static void microchip_xisc_remove(struct platform_device *pdev)
{}

static int __maybe_unused xisc_runtime_suspend(struct device *dev)
{}

static int __maybe_unused xisc_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops microchip_xisc_dev_pm_ops =;

#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id microchip_xisc_of_match[] =;
MODULE_DEVICE_TABLE(of, microchip_xisc_of_match);
#endif

static struct platform_driver microchip_xisc_driver =;

module_platform_driver();

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