staging: media: tegra-video: csi: move CSI helpers to header

Move CSI helpers into the header for easier access from SoC-specific video
driver parts.

Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20, parallel camera
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Svyatoslav Ryhel 2026-03-03 10:42:27 +02:00 committed by Hans Verkuil
parent 4c9f5dc521
commit 6926495fa5
2 changed files with 10 additions and 11 deletions

View File

@ -20,17 +20,6 @@
#define MHZ 1000000
static inline struct tegra_csi *
host1x_client_to_csi(struct host1x_client *client)
{
return container_of(client, struct tegra_csi, client);
}
static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev)
{
return container_of(subdev, struct tegra_csi_channel, subdev);
}
/*
* CSI is a separate subdevice which has 6 source pads to generate
* test pattern. CSI subdevice pad ops are used only for TPG and

View File

@ -155,6 +155,16 @@ struct tegra_csi {
struct list_head csi_chans;
};
static inline struct tegra_csi *host1x_client_to_csi(struct host1x_client *client)
{
return container_of(client, struct tegra_csi, client);
}
static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev)
{
return container_of(subdev, struct tegra_csi_channel, subdev);
}
void tegra_csi_error_recover(struct v4l2_subdev *subdev);
void tegra_csi_calc_settle_time(struct tegra_csi_channel *csi_chan,
u8 csi_port_num,