linux/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing)
 * Author: Yong Deng <[email protected]>
 * Copyright 2021-2022 Bootlin
 * Author: Paul Kocialkowski <[email protected]>
 */

#ifndef _SUN6I_CAPTURE_H_
#define _SUN6I_CAPTURE_H_

#include <media/v4l2-device.h>

#define SUN6I_CSI_CAPTURE_NAME

#define SUN6I_CSI_CAPTURE_WIDTH_MIN
#define SUN6I_CSI_CAPTURE_WIDTH_MAX
#define SUN6I_CSI_CAPTURE_HEIGHT_MIN
#define SUN6I_CSI_CAPTURE_HEIGHT_MAX

struct sun6i_csi_device;

struct sun6i_csi_capture_format {};

struct sun6i_csi_capture_format_match {};

#undef current
struct sun6i_csi_capture_state {};

struct sun6i_csi_capture {};

/* Helpers */

void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev,
				  unsigned int *width, unsigned int *height);
void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev,
			      u32 *pixelformat, u32 *field);

/* Format */

const
struct sun6i_csi_capture_format *sun6i_csi_capture_format_find(u32 pixelformat);

/* Capture */

void sun6i_csi_capture_configure(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_state_update(struct sun6i_csi_device *csi_dev);

/* State */

void sun6i_csi_capture_sync(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_frame_done(struct sun6i_csi_device *csi_dev);

/* Capture */

int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev);
void sun6i_csi_capture_cleanup(struct sun6i_csi_device *csi_dev);

#endif