Skip to content

Commit 47bfe30

Browse files
flamingradian6by9
authored andcommitted
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>
1 parent 96ed740 commit 47bfe30

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/media/i2c/imx355.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
#define IMX355_EXT_CLK 19200000
6767
#define IMX355_LINK_FREQ_INDEX 0
6868

69+
/* number of data lanes */
70+
#define IMX355_DATA_LANES 4
71+
6972
struct imx355_reg {
7073
u16 address;
7174
u8 val;
@@ -1705,6 +1708,9 @@ static struct imx355_hwcfg *imx355_get_hwcfg(struct device *dev)
17051708
if (!cfg)
17061709
goto out_err;
17071710

1711+
if (bus_cfg.bus.mipi_csi2.num_data_lanes != IMX355_DATA_LANES)
1712+
goto out_err;
1713+
17081714
ret = v4l2_link_freq_to_bitmap(dev, bus_cfg.link_frequencies,
17091715
bus_cfg.nr_of_link_frequencies,
17101716
link_freq_menu_items,

0 commit comments

Comments
 (0)