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.

media: i2c: imx355: Restrict data lanes to 4

The IMX355 sensor driver currently supports having 4 data lanes. There
can't be more or less, so check if the firmware specifies 4 lanes.

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/aW3uFcT1zmiF4GUP@kekkonen.localdomain
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Richard Acayan and committed by
Hans Verkuil
d3ac6212 08f9794d

+6
+6
drivers/media/i2c/imx355.c
··· 66 66 #define IMX355_EXT_CLK 19200000 67 67 #define IMX355_LINK_FREQ_INDEX 0 68 68 69 + /* number of data lanes */ 70 + #define IMX355_DATA_LANES 4 71 + 69 72 struct imx355_reg { 70 73 u16 address; 71 74 u8 val; ··· 1706 1703 1707 1704 cfg = devm_kzalloc(dev, sizeof(*cfg), GFP_KERNEL); 1708 1705 if (!cfg) 1706 + goto out_err; 1707 + 1708 + if (bus_cfg.bus.mipi_csi2.num_data_lanes != IMX355_DATA_LANES) 1709 1709 goto out_err; 1710 1710 1711 1711 ret = v4l2_link_freq_to_bitmap(dev, bus_cfg.link_frequencies,