Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Svyatoslav Ryhel and committed by
Hans Verkuil
6926495f 4c9f5dc5

+10 -11
-11
drivers/staging/media/tegra-video/csi.c
··· 20 20 21 21 #define MHZ 1000000 22 22 23 - static inline struct tegra_csi * 24 - host1x_client_to_csi(struct host1x_client *client) 25 - { 26 - return container_of(client, struct tegra_csi, client); 27 - } 28 - 29 - static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev) 30 - { 31 - return container_of(subdev, struct tegra_csi_channel, subdev); 32 - } 33 - 34 23 /* 35 24 * CSI is a separate subdevice which has 6 source pads to generate 36 25 * test pattern. CSI subdevice pad ops are used only for TPG and
+10
drivers/staging/media/tegra-video/csi.h
··· 155 155 struct list_head csi_chans; 156 156 }; 157 157 158 + static inline struct tegra_csi *host1x_client_to_csi(struct host1x_client *client) 159 + { 160 + return container_of(client, struct tegra_csi, client); 161 + } 162 + 163 + static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev) 164 + { 165 + return container_of(subdev, struct tegra_csi_channel, subdev); 166 + } 167 + 158 168 void tegra_csi_error_recover(struct v4l2_subdev *subdev); 159 169 void tegra_csi_calc_settle_time(struct tegra_csi_channel *csi_chan, 160 170 u8 csi_port_num,