#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mem2mem.h>
#include "sun8i-formats.h"
#include "sun8i-rotate.h"
static inline u32 rotate_read(struct rotate_dev *dev, u32 reg)
{ … }
static inline void rotate_write(struct rotate_dev *dev, u32 reg, u32 value)
{ … }
static inline void rotate_set_bits(struct rotate_dev *dev, u32 reg, u32 bits)
{ … }
static void rotate_calc_addr_pitch(dma_addr_t buffer,
u32 bytesperline, u32 height,
const struct rotate_format *fmt,
dma_addr_t *addr, u32 *pitch)
{ … }
static void rotate_device_run(void *priv)
{ … }
static irqreturn_t rotate_irq(int irq, void *data)
{ … }
static inline struct rotate_ctx *rotate_file2ctx(struct file *file)
{ … }
static void rotate_prepare_format(struct v4l2_pix_format *pix_fmt)
{ … }
static int rotate_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int rotate_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int rotate_enum_fmt_vid_out(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int rotate_enum_framesizes(struct file *file, void *priv,
struct v4l2_frmsizeenum *fsize)
{ … }
static int rotate_set_cap_format(struct rotate_ctx *ctx,
struct v4l2_pix_format *f,
u32 rotate)
{ … }
static int rotate_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rotate_g_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rotate_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rotate_try_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rotate_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int rotate_s_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static const struct v4l2_ioctl_ops rotate_ioctl_ops = …;
static int rotate_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int rotate_buf_prepare(struct vb2_buffer *vb)
{ … }
static void rotate_buf_queue(struct vb2_buffer *vb)
{ … }
static void rotate_queue_cleanup(struct vb2_queue *vq, u32 state)
{ … }
static int rotate_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void rotate_stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops rotate_qops = …;
static int rotate_queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }
static int rotate_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops rotate_ctrl_ops = …;
static int rotate_setup_ctrls(struct rotate_ctx *ctx)
{ … }
static int rotate_open(struct file *file)
{ … }
static int rotate_release(struct file *file)
{ … }
static const struct v4l2_file_operations rotate_fops = …;
static const struct video_device rotate_video_device = …;
static const struct v4l2_m2m_ops rotate_m2m_ops = …;
static int rotate_probe(struct platform_device *pdev)
{ … }
static void rotate_remove(struct platform_device *pdev)
{ … }
static int rotate_runtime_resume(struct device *device)
{ … }
static int rotate_runtime_suspend(struct device *device)
{ … }
static const struct of_device_id rotate_dt_match[] = …;
MODULE_DEVICE_TABLE(of, rotate_dt_match);
static const struct dev_pm_ops rotate_pm_ops = …;
static struct platform_driver rotate_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;