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

// SPDX-License-Identifier: GPL-2.0
/*
 * Microchip Image Sensor Controller (ISC) driver
 *
 * Copyright (C) 2016-2019 Microchip Technology, Inc.
 *
 * Author: Songjun Wu
 * Author: Eugen Hristev <[email protected]>
 *
 *
 * Sensor-->PFE-->WB-->CFA-->CC-->GAM-->CSC-->CBC-->SUB-->RLP-->DMA
 *
 * ISC video pipeline integrates the following submodules:
 * PFE: Parallel Front End to sample the camera sensor input stream
 *  WB: Programmable white balance in the Bayer domain
 * CFA: Color filter array interpolation module
 *  CC: Programmable color correction
 * GAM: Gamma correction
 * CSC: Programmable color space conversion
 * CBC: Contrast and Brightness control
 * SUB: This module performs YCbCr444 to YCbCr420 chrominance subsampling
 * RLP: This module performs rounding, range limiting
 *      and packing of the incoming data
 */

#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_SAMA5D2_MAX_SUPPORT_WIDTH
#define ISC_SAMA5D2_MAX_SUPPORT_HEIGHT

#define ISC_SAMA5D2_PIPELINE

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

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

static void isc_sama5d2_config_csc(struct isc_device *isc)
{}

static void isc_sama5d2_config_cbc(struct isc_device *isc)
{}

static void isc_sama5d2_config_cc(struct isc_device *isc)
{}

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

static void isc_sama5d2_config_dpc(struct isc_device *isc)
{}

static void isc_sama5d2_config_gam(struct isc_device *isc)
{}

static void isc_sama5d2_config_rlp(struct isc_device *isc)
{}

static void isc_sama5d2_adapt_pipeline(struct isc_device *isc)
{}

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

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

static int microchip_isc_probe(struct platform_device *pdev)
{}

static void microchip_isc_remove(struct platform_device *pdev)
{}

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

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

static const struct dev_pm_ops microchip_isc_dev_pm_ops =;

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

static struct platform_driver microchip_isc_driver =;

module_platform_driver();

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