2019-05-29 14:18:00 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2011-11-12 15:06:02 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011 Texas Instruments Inc
|
|
|
|
*/
|
|
|
|
#ifndef _VPIF_TYPES_H
|
|
|
|
#define _VPIF_TYPES_H
|
|
|
|
|
2011-12-23 06:28:44 +00:00
|
|
|
#include <linux/i2c.h>
|
|
|
|
|
2011-11-12 15:06:02 +00:00
|
|
|
#define VPIF_CAPTURE_MAX_CHANNELS 2
|
2012-09-25 11:11:49 +00:00
|
|
|
#define VPIF_DISPLAY_MAX_CHANNELS 2
|
2011-11-12 15:06:02 +00:00
|
|
|
|
|
|
|
enum vpif_if_type {
|
|
|
|
VPIF_IF_BT656,
|
|
|
|
VPIF_IF_BT1120,
|
|
|
|
VPIF_IF_RAW_BAYER
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_interface {
|
|
|
|
enum vpif_if_type if_type;
|
|
|
|
unsigned hd_pol:1;
|
|
|
|
unsigned vd_pol:1;
|
|
|
|
unsigned fid_pol:1;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_subdev_info {
|
|
|
|
const char *name;
|
|
|
|
struct i2c_board_info board_info;
|
|
|
|
};
|
|
|
|
|
2012-09-25 11:11:49 +00:00
|
|
|
struct vpif_output {
|
|
|
|
struct v4l2_output output;
|
|
|
|
const char *subdev_name;
|
|
|
|
u32 input_route;
|
|
|
|
u32 output_route;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_display_chan_config {
|
|
|
|
const struct vpif_output *outputs;
|
|
|
|
int output_count;
|
|
|
|
bool clip_en;
|
|
|
|
};
|
|
|
|
|
2011-11-12 15:06:02 +00:00
|
|
|
struct vpif_display_config {
|
|
|
|
int (*set_clock)(int, int);
|
|
|
|
struct vpif_subdev_info *subdevinfo;
|
|
|
|
int subdev_count;
|
2017-02-16 18:08:01 +00:00
|
|
|
int i2c_adapter_id;
|
2012-09-25 11:11:49 +00:00
|
|
|
struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS];
|
2011-11-12 15:06:02 +00:00
|
|
|
const char *card_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_input {
|
|
|
|
struct v4l2_input input;
|
2017-06-06 23:37:39 +00:00
|
|
|
char *subdev_name;
|
2012-09-20 12:06:25 +00:00
|
|
|
u32 input_route;
|
|
|
|
u32 output_route;
|
2011-11-12 15:06:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_capture_chan_config {
|
2012-09-20 12:06:32 +00:00
|
|
|
struct vpif_interface vpif_if;
|
2017-06-06 23:37:39 +00:00
|
|
|
struct vpif_input *inputs;
|
2011-11-12 15:06:02 +00:00
|
|
|
int input_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vpif_capture_config {
|
|
|
|
int (*setup_input_channel_mode)(int);
|
|
|
|
int (*setup_input_path)(int, const char *);
|
|
|
|
struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
|
|
|
|
struct vpif_subdev_info *subdev_info;
|
|
|
|
int subdev_count;
|
2016-12-07 18:30:22 +00:00
|
|
|
int i2c_adapter_id;
|
2011-11-12 15:06:02 +00:00
|
|
|
const char *card_name;
|
2017-06-06 23:37:39 +00:00
|
|
|
|
|
|
|
struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS];
|
|
|
|
int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS];
|
2011-11-12 15:06:02 +00:00
|
|
|
};
|
|
|
|
#endif /* _VPIF_TYPES_H */
|