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

media: ipu-bridge: Fix Kconfig dependencies

The current Kconfig symbol dependencies allow having the following Kconfig
symbol values

CONFIG_IPU_BRIDGE=m
CONFIG_VIDEO_IPU3_CIO2=y
CONFIG_CIO2_BRIDGE=n

This does not work as the IPU bridge API is conditional to
IS_ENABLED(CONFIG_IPU_BRIDGE). Fix this by changing the dependencies so
that CONFIG_IPU_BRIDGE can be separately selected.

The CONFIG_CIO2_BRIDGE symbol becomes redundant as a result and is
removed.

Fixes: 2545a2c02ba1 ("media: ipu3-cio2: allow ipu_bridge to be a module again")
Suggested-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Sakari Ailus and committed by
Hans Verkuil
4670c8c3 760d03f9

+17 -28
+15 -7
drivers/media/pci/intel/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - config IPU_BRIDGE 3 - tristate 4 - depends on I2C && ACPI 5 - help 6 - This is a helper module for the IPU bridge, which can be 7 - used by ipu3 and other drivers. In order to handle module 8 - dependencies, this is selected by each driver that needs it. 9 2 10 3 source "drivers/media/pci/intel/ipu3/Kconfig" 11 4 source "drivers/media/pci/intel/ivsc/Kconfig" 5 + 6 + config IPU_BRIDGE 7 + tristate "Intel IPU Bridge" 8 + depends on I2C && ACPI 9 + help 10 + The IPU bridge is a helper library for Intel IPU drivers to 11 + function on systems shipped with Windows. 12 + 13 + Currently used by the ipu3-cio2 and atomisp drivers. 14 + 15 + Supported systems include: 16 + 17 + - Microsoft Surface models (except Surface Pro 3) 18 + - The Lenovo Miix line (for example the 510, 520, 710 and 720) 19 + - Dell 7285
+1 -20
drivers/media/pci/intel/ipu3/Kconfig
··· 2 2 config VIDEO_IPU3_CIO2 3 3 tristate "Intel ipu3-cio2 driver" 4 4 depends on VIDEO_DEV && PCI 5 + depends on IPU_BRIDGE || !IPU_BRIDGE 5 6 depends on ACPI || COMPILE_TEST 6 7 depends on X86 7 8 select MEDIA_CONTROLLER 8 9 select VIDEO_V4L2_SUBDEV_API 9 10 select V4L2_FWNODE 10 11 select VIDEOBUF2_DMA_SG 11 - select IPU_BRIDGE if CIO2_BRIDGE 12 12 13 13 help 14 14 This is the Intel IPU3 CIO2 CSI-2 receiver unit, found in Intel ··· 18 18 Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2 19 19 connected camera. 20 20 The module will be called ipu3-cio2. 21 - 22 - config CIO2_BRIDGE 23 - bool "IPU3 CIO2 Sensors Bridge" 24 - depends on VIDEO_IPU3_CIO2 && ACPI 25 - depends on I2C 26 - help 27 - This extension provides an API for the ipu3-cio2 driver to create 28 - connections to cameras that are hidden in the SSDB buffer in ACPI. 29 - It can be used to enable support for cameras in detachable / hybrid 30 - devices that ship with Windows. 31 - 32 - Say Y here if your device is a detachable / hybrid laptop that comes 33 - with Windows installed by the OEM, for example: 34 - 35 - - Microsoft Surface models (except Surface Pro 3) 36 - - The Lenovo Miix line (for example the 510, 520, 710 and 720) 37 - - Dell 7285 38 - 39 - If in doubt, say N here.
+1 -1
drivers/staging/media/atomisp/Kconfig
··· 12 12 config VIDEO_ATOMISP 13 13 tristate "Intel Atom Image Signal Processor Driver" 14 14 depends on VIDEO_DEV && INTEL_ATOMISP 15 + depends on IPU_BRIDGE 15 16 depends on MEDIA_PCI_SUPPORT 16 17 depends on PMIC_OPREGION 17 18 depends on I2C 18 19 select V4L2_FWNODE 19 20 select IOSF_MBI 20 - select IPU_BRIDGE 21 21 select VIDEOBUF2_VMALLOC 22 22 select VIDEO_V4L2_SUBDEV_API 23 23 help