diff options
Diffstat (limited to 'drivers/media/platform/rcar-vin/rcar-vin.h')
-rw-r--r-- | drivers/media/platform/rcar-vin/rcar-vin.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h index 8396e0e45478..0ee9d402f5ac 100644 --- a/drivers/media/platform/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/rcar-vin/rcar-vin.h @@ -49,16 +49,18 @@ enum rvin_csi_id { }; /** - * STOPPED - No operation in progress - * STARTING - Capture starting up - * RUNNING - Operation in progress have buffers - * STOPPING - Stopping operation + * STOPPED - No operation in progress + * STARTING - Capture starting up + * RUNNING - Operation in progress have buffers + * STOPPING - Stopping operation + * SUSPENDED - Capture is suspended */ enum rvin_dma_state { STOPPED = 0, STARTING, RUNNING, STOPPING, + SUSPENDED, }; /** @@ -99,7 +101,7 @@ struct rvin_video_format { * */ struct rvin_parallel_entity { - struct v4l2_async_subdev asd; + struct v4l2_async_subdev *asd; struct v4l2_subdev *subdev; enum v4l2_mbus_type mbus_type; @@ -189,6 +191,7 @@ struct rvin_info { * @state: keeps track of operation state * * @is_csi: flag to mark the VIN as using a CSI-2 subdevice + * @chsel Cached value of the current CSI-2 channel selection * * @mbus_code: media bus format code * @format: active V4L2 pixel format @@ -210,7 +213,7 @@ struct rvin_dev { struct v4l2_ctrl_handler ctrl_handler; struct v4l2_async_notifier notifier; - struct rvin_parallel_entity *parallel; + struct rvin_parallel_entity parallel; struct rvin_group *group; unsigned int id; @@ -232,6 +235,7 @@ struct rvin_dev { enum rvin_dma_state state; bool is_csi; + unsigned int chsel; u32 mbus_code; struct v4l2_pix_format format; @@ -244,7 +248,7 @@ struct rvin_dev { unsigned int alpha; }; -#define vin_to_source(vin) ((vin)->parallel->subdev) +#define vin_to_source(vin) ((vin)->parallel.subdev) /* Debug */ #define vin_dbg(d, fmt, arg...) dev_dbg(d->dev, fmt, ##arg) @@ -276,7 +280,7 @@ struct rvin_group { struct rvin_dev *vin[RCAR_VIN_NUM]; struct { - struct fwnode_handle *fwnode; + struct v4l2_async_subdev *asd; struct v4l2_subdev *subdev; } csi[RVIN_CSI_MAX]; }; @@ -297,4 +301,7 @@ void rvin_crop_scale_comp(struct rvin_dev *vin); int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel); void rvin_set_alpha(struct rvin_dev *vin, unsigned int alpha); +int rvin_start_streaming(struct rvin_dev *vin); +void rvin_stop_streaming(struct rvin_dev *vin); + #endif |