#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/xilinx-v4l2-controls.h>
#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>
#include "xilinx-vip.h"
#include "xilinx-vtc.h"
#define XTPG_CTRL_STATUS_SLAVE_ERROR …
#define XTPG_CTRL_IRQ_SLAVE_ERROR …
#define XTPG_PATTERN_CONTROL …
#define XTPG_PATTERN_MASK …
#define XTPG_PATTERN_CONTROL_CROSS_HAIRS …
#define XTPG_PATTERN_CONTROL_MOVING_BOX …
#define XTPG_PATTERN_CONTROL_COLOR_MASK_SHIFT …
#define XTPG_PATTERN_CONTROL_COLOR_MASK_MASK …
#define XTPG_PATTERN_CONTROL_STUCK_PIXEL …
#define XTPG_PATTERN_CONTROL_NOISE …
#define XTPG_PATTERN_CONTROL_MOTION …
#define XTPG_MOTION_SPEED …
#define XTPG_CROSS_HAIRS …
#define XTPG_CROSS_HAIRS_ROW_SHIFT …
#define XTPG_CROSS_HAIRS_ROW_MASK …
#define XTPG_CROSS_HAIRS_COLUMN_SHIFT …
#define XTPG_CROSS_HAIRS_COLUMN_MASK …
#define XTPG_ZPLATE_HOR_CONTROL …
#define XTPG_ZPLATE_VER_CONTROL …
#define XTPG_ZPLATE_START_SHIFT …
#define XTPG_ZPLATE_START_MASK …
#define XTPG_ZPLATE_SPEED_SHIFT …
#define XTPG_ZPLATE_SPEED_MASK …
#define XTPG_BOX_SIZE …
#define XTPG_BOX_COLOR …
#define XTPG_STUCK_PIXEL_THRESH …
#define XTPG_NOISE_GAIN …
#define XTPG_BAYER_PHASE …
#define XTPG_BAYER_PHASE_RGGB …
#define XTPG_BAYER_PHASE_GRBG …
#define XTPG_BAYER_PHASE_GBRG …
#define XTPG_BAYER_PHASE_BGGR …
#define XTPG_BAYER_PHASE_OFF …
#define XTPG_MIN_HBLANK …
#define XTPG_MAX_HBLANK …
#define XTPG_MIN_VBLANK …
#define XTPG_MAX_VBLANK …
struct xtpg_device { … };
static inline struct xtpg_device *to_tpg(struct v4l2_subdev *subdev)
{ … }
static u32 xtpg_get_bayer_phase(unsigned int code)
{ … }
static void __xtpg_update_pattern_control(struct xtpg_device *xtpg,
bool passthrough, bool pattern)
{ … }
static void xtpg_update_pattern_control(struct xtpg_device *xtpg,
bool passthrough, bool pattern)
{ … }
static int xtpg_s_stream(struct v4l2_subdev *subdev, int enable)
{ … }
static struct v4l2_mbus_framefmt *
__xtpg_get_pad_format(struct xtpg_device *xtpg,
struct v4l2_subdev_state *sd_state,
unsigned int pad, u32 which)
{ … }
static int xtpg_get_format(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int xtpg_set_format(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int xtpg_enum_frame_size(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int xtpg_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh)
{ … }
static int xtpg_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh)
{ … }
static int xtpg_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops xtpg_ctrl_ops = …;
static const struct v4l2_subdev_core_ops xtpg_core_ops = …;
static const struct v4l2_subdev_video_ops xtpg_video_ops = …;
static const struct v4l2_subdev_pad_ops xtpg_pad_ops = …;
static const struct v4l2_subdev_ops xtpg_ops = …;
static const struct v4l2_subdev_internal_ops xtpg_internal_ops = …;
static const char *const xtpg_pattern_strings[] = …;
static struct v4l2_ctrl_config xtpg_ctrls[] = …;
static const struct media_entity_operations xtpg_media_ops = …;
static int __maybe_unused xtpg_pm_suspend(struct device *dev)
{ … }
static int __maybe_unused xtpg_pm_resume(struct device *dev)
{ … }
static int xtpg_parse_of(struct xtpg_device *xtpg)
{ … }
static int xtpg_probe(struct platform_device *pdev)
{ … }
static void xtpg_remove(struct platform_device *pdev)
{ … }
static SIMPLE_DEV_PM_OPS(xtpg_pm_ops, xtpg_pm_suspend, xtpg_pm_resume);
static const struct of_device_id xtpg_of_id_table[] = …;
MODULE_DEVICE_TABLE(of, xtpg_of_id_table);
static struct platform_driver xtpg_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;