linux/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2021-2022 Bootlin
 * Author: Paul Kocialkowski <[email protected]>
 */

#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <media/v4l2-device.h>
#include <media/v4l2-mc.h>

#include "sun6i_isp.h"
#include "sun6i_isp_capture.h"
#include "sun6i_isp_params.h"
#include "sun6i_isp_proc.h"
#include "sun6i_isp_reg.h"

/* Helpers */

u32 sun6i_isp_load_read(struct sun6i_isp_device *isp_dev, u32 offset)
{}

void sun6i_isp_load_write(struct sun6i_isp_device *isp_dev, u32 offset,
			  u32 value)
{}

/* State */

/*
 * The ISP works with a load buffer, which gets copied to the actual registers
 * by the hardware before processing a frame when a specific flag is set.
 * This is represented by tracking the ISP state in the different parts of
 * the code with explicit sync points:
 * - state update: to update the load buffer for the next frame if necessary;
 * - state complete: to indicate that the state update was applied.
 */

static void sun6i_isp_state_ready(struct sun6i_isp_device *isp_dev)
{}

static void sun6i_isp_state_complete(struct sun6i_isp_device *isp_dev)
{}

void sun6i_isp_state_update(struct sun6i_isp_device *isp_dev, bool ready_hold)
{}

/* Tables */

static int sun6i_isp_table_setup(struct sun6i_isp_device *isp_dev,
				 struct sun6i_isp_table *table)
{}

static void sun6i_isp_table_cleanup(struct sun6i_isp_device *isp_dev,
				    struct sun6i_isp_table *table)
{}

void sun6i_isp_tables_configure(struct sun6i_isp_device *isp_dev)
{}

static int sun6i_isp_tables_setup(struct sun6i_isp_device *isp_dev,
				  const struct sun6i_isp_variant *variant)
{}

static void sun6i_isp_tables_cleanup(struct sun6i_isp_device *isp_dev)
{}

/* Media */

static const struct media_device_ops sun6i_isp_media_ops =;

/* V4L2 */

static int sun6i_isp_v4l2_setup(struct sun6i_isp_device *isp_dev)
{}

static void sun6i_isp_v4l2_cleanup(struct sun6i_isp_device *isp_dev)
{}

/* Platform */

static irqreturn_t sun6i_isp_interrupt(int irq, void *private)
{}

static int sun6i_isp_suspend(struct device *dev)
{}

static int sun6i_isp_resume(struct device *dev)
{}

static const struct dev_pm_ops sun6i_isp_pm_ops =;

static const struct regmap_config sun6i_isp_regmap_config =;

static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev,
				     struct platform_device *platform_dev)
{}

static void sun6i_isp_resources_cleanup(struct sun6i_isp_device *isp_dev)
{}

static int sun6i_isp_probe(struct platform_device *platform_dev)
{}

static void sun6i_isp_remove(struct platform_device *platform_dev)
{}

/*
 * History of sun6i-isp:
 * - sun4i-a10-isp: initial ISP tied to the CSI0 controller,
 *   apparently unused in software implementations;
 * - sun6i-a31-isp: separate ISP loosely based on sun4i-a10-isp,
 *   adding extra modules and features;
 * - sun9i-a80-isp: based on sun6i-a31-isp with some register offset changes
 *   and new modules like saturation and cnr;
 * - sun8i-a23-isp/sun8i-h3-isp: based on sun9i-a80-isp with most modules
 *   related to raw removed;
 * - sun8i-a83t-isp: based on sun9i-a80-isp with some register offset changes
 * - sun8i-v3s-isp: based on sun8i-a83t-isp with a new disc module;
 */

static const struct sun6i_isp_variant sun8i_v3s_isp_variant =;

static const struct of_device_id sun6i_isp_of_match[] =;

MODULE_DEVICE_TABLE(of, sun6i_isp_of_match);

static struct platform_driver sun6i_isp_platform_driver =;

module_platform_driver();

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