Commit 43e36a22 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Cache the CSI-2 channel selection value

In preparation of suspend/resume support cache the chsel value when
written to the register so it can be restored on resume if needed.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b83a18cc
...@@ -1456,6 +1456,8 @@ int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel) ...@@ -1456,6 +1456,8 @@ int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel)
vin_dbg(vin, "Set IFMD 0x%x\n", ifmd); vin_dbg(vin, "Set IFMD 0x%x\n", ifmd);
vin->chsel = chsel;
/* Restore VNMC. */ /* Restore VNMC. */
rvin_write(vin, vnmc, VNMC_REG); rvin_write(vin, vnmc, VNMC_REG);
......
...@@ -189,6 +189,7 @@ struct rvin_info { ...@@ -189,6 +189,7 @@ struct rvin_info {
* @state: keeps track of operation state * @state: keeps track of operation state
* *
* @is_csi: flag to mark the VIN as using a CSI-2 subdevice * @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 * @mbus_code: media bus format code
* @format: active V4L2 pixel format * @format: active V4L2 pixel format
...@@ -232,6 +233,7 @@ struct rvin_dev { ...@@ -232,6 +233,7 @@ struct rvin_dev {
enum rvin_dma_state state; enum rvin_dma_state state;
bool is_csi; bool is_csi;
unsigned int chsel;
u32 mbus_code; u32 mbus_code;
struct v4l2_pix_format format; struct v4l2_pix_format format;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment