media: atomisp: Ensure CSI-receiver[x] -> ISP links correctly reflect current sensor
authorHans de Goede <hdegoede@redhat.com>
Thu, 11 Apr 2024 20:21:37 +0000 (21:21 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 Apr 2024 09:50:54 +0000 (10:50 +0100)
commit2ab6c22d61e49518b6abd10105b747bc11780b95
tree22bb10cbebd25dc14d2c47267d970a95176ac767
parent2bcbeeb2979d6f97c150ed88488b16e2bf83bf64
media: atomisp: Ensure CSI-receiver[x] -> ISP links correctly reflect current sensor

Add a new atomisp_setup_input_links() helper which ensures that
the CSI-receiver -> ISP link for input_curr is marked as enabled and
the other CSI-receiver -> ISP links are disabled.

And call this helper from atomisp_register_device_nodes() for the initial
setup and from atomisp_select_input() for runtime input_curr changes.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_cmd.h
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c