From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Daniel Scally <dan.scally@ideasonboard.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
linux-acpi@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Andy Shevchenko <andy@kernel.org>, Kate Hsuan <hpa@redhat.com>,
Hao Yao <hao.yao@intel.com>, Bingbu Cao <bingbu.cao@intel.com>,
linux-media@vger.kernel.org
Subject: [PATCH v3 04/18] media: ipu-bridge: Allow building as module
Date: Wed, 5 Jul 2023 23:29:56 +0200 [thread overview]
Message-ID: <20230705213010.390849-5-hdegoede@redhat.com> (raw)
In-Reply-To: <20230705213010.390849-1-hdegoede@redhat.com>
After commit f54eb0ac7c1a ("media: ipu3-cio2: rename cio2 bridge to ipu
bridge and move out of ipu3") the ipu-bridge code is always built in
even if all consumers are build as module.
Fix this by turning "config IPU_BRIDGE" into a pure library Kconfig
option (not user selectable, must be selected by consumers) and
re-introducing the CIO2_BRIDGE Kconfig bits in .../pci/intel/ipu3/Kconfig
which were dropped to still allow building ipu3-cio2 without ipu-bridge
support.
Fixes: f54eb0ac7c1a ("media: ipu3-cio2: rename cio2 bridge to ipu bridge and move out of ipu3")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/media/pci/intel/Kconfig | 18 ++----------------
drivers/media/pci/intel/ipu-bridge.c | 4 ++++
drivers/media/pci/intel/ipu3/Kconfig | 20 ++++++++++++++++++++
3 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig
index 64a29b0b7033..3179184d7616 100644
--- a/drivers/media/pci/intel/Kconfig
+++ b/drivers/media/pci/intel/Kconfig
@@ -1,21 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
config IPU_BRIDGE
- bool "Intel IPU Sensors Bridge"
- depends on VIDEO_IPU3_CIO2 && ACPI
+ tristate
+ depends on ACPI
depends on I2C
- help
- This extension provides an API for the Intel IPU driver to create
- connections to cameras that are hidden in the SSDB buffer in ACPI.
- It can be used to enable support for cameras in detachable / hybrid
- devices that ship with Windows.
-
- Say Y here if your device is a detachable / hybrid laptop that comes
- with Windows installed by the OEM, for example:
-
- - Microsoft Surface models (except Surface Pro 3)
- - The Lenovo Miix line (for example the 510, 520, 710 and 720)
- - Dell 7285
-
- If in doubt, say N here.
source "drivers/media/pci/intel/ipu3/Kconfig"
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index 1c88fd925a8b..97b544736af2 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -497,3 +497,7 @@ int ipu_bridge_init(struct pci_dev *ipu)
return ret;
}
EXPORT_SYMBOL_NS_GPL(ipu_bridge_init, INTEL_IPU_BRIDGE);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Dan Scally <djrscally@gmail.com>");
+MODULE_DESCRIPTION("Intel IPU ACPI Sensors Bridge");
diff --git a/drivers/media/pci/intel/ipu3/Kconfig b/drivers/media/pci/intel/ipu3/Kconfig
index 9be06ee81ff0..0951545eab21 100644
--- a/drivers/media/pci/intel/ipu3/Kconfig
+++ b/drivers/media/pci/intel/ipu3/Kconfig
@@ -8,6 +8,7 @@ config VIDEO_IPU3_CIO2
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
select VIDEOBUF2_DMA_SG
+ select IPU_BRIDGE if CIO2_BRIDGE
help
This is the Intel IPU3 CIO2 CSI-2 receiver unit, found in Intel
@@ -17,3 +18,22 @@ config VIDEO_IPU3_CIO2
Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2
connected camera.
The module will be called ipu3-cio2.
+
+config CIO2_BRIDGE
+ bool "IPU3 CIO2 Sensors Bridge"
+ depends on VIDEO_IPU3_CIO2 && ACPI
+ depends on I2C
+ help
+ This extension provides an API for the ipu3-cio2 driver to create
+ connections to cameras that are hidden in the SSDB buffer in ACPI.
+ It can be used to enable support for cameras in detachable / hybrid
+ devices that ship with Windows.
+
+ Say Y here if your device is a detachable / hybrid laptop that comes
+ with Windows installed by the OEM, for example:
+
+ - Microsoft Surface models (except Surface Pro 3)
+ - The Lenovo Miix line (for example the 510, 520, 710 and 720)
+ - Dell 7285
+
+ If in doubt, say N here.
--
2.41.0
next prev parent reply other threads:[~2023-07-05 21:32 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 21:29 [PATCH v3 00/18] media: ipu-bridge: Shared with atomisp, rework VCM instantiation Hans de Goede
2023-07-05 21:29 ` [PATCH v3 01/18] media: ipu-bridge: Fix null pointer deref on SSDB/PLD parsing warnings Hans de Goede
2023-07-06 13:07 ` Dan Scally
2023-07-05 21:29 ` [PATCH v3 02/18] media: ipu-bridge: Do not use on stack memory for software_node.name field Hans de Goede
2023-07-05 21:29 ` [PATCH v3 03/18] media: ipu-bridge: Move initialization of node_names.vcm to ipu_bridge_init_swnode_names() Hans de Goede
2023-07-05 21:29 ` Hans de Goede [this message]
2023-07-06 9:47 ` [PATCH v3 04/18] media: ipu-bridge: Allow building as module Andy Shevchenko
2023-07-05 21:29 ` [PATCH v3 05/18] media: ipu-bridge: Make ipu_bridge_init() take a regular struct device as argument Hans de Goede
2023-07-05 21:29 ` [PATCH v3 06/18] media: ipu-bridge: Store dev pointer in struct ipu_bridge Hans de Goede
2023-07-05 21:29 ` [PATCH v3 07/18] media: ipu-bridge: Only keep PLD around while parsing Hans de Goede
2023-07-05 21:30 ` [PATCH v3 08/18] media: ipu-bridge: Add a ipu_bridge_parse_ssdb() helper function Hans de Goede
2023-07-05 21:30 ` [PATCH v3 09/18] media: ipu-bridge: Drop early setting of sensor->adev Hans de Goede
2023-07-05 21:30 ` [PATCH v3 10/18] media: ipu-bridge: Add a parse_sensor_fwnode callback to ipu_bridge_init() Hans de Goede
2023-07-06 9:50 ` Andy Shevchenko
2023-07-05 21:30 ` [PATCH v3 11/18] media: ipu-bridge: Move ipu-bridge.h to include/media/ Hans de Goede
2023-07-05 21:30 ` [PATCH v3 12/18] media: ipu-bridge: Add GalaxyCore GC0310 to ipu_supported_sensors[] Hans de Goede
2023-07-05 21:30 ` [PATCH v3 13/18] media: ipu-bridge: Add a runtime-pm device-link between VCM and sensor Hans de Goede
2023-07-05 21:30 ` [PATCH v3 14/18] media: i2c: Add driver for DW9719 VCM Hans de Goede
2023-07-06 7:47 ` Sakari Ailus
2023-07-06 9:14 ` Andy Shevchenko
2023-07-06 9:30 ` Sakari Ailus
2023-07-06 10:06 ` Andy Shevchenko
2023-07-06 10:27 ` Sakari Ailus
2023-07-06 10:48 ` Andy Shevchenko
2023-07-06 11:02 ` Sakari Ailus
2023-07-06 14:34 ` Hans de Goede
2023-07-06 14:47 ` Andy Shevchenko
2023-07-06 11:18 ` Dave Stevenson
2023-07-06 12:34 ` Hans de Goede
2023-07-06 12:52 ` Hans de Goede
2023-07-05 21:30 ` [PATCH v3 15/18] ACPI: bus: Introduce acpi_match_acpi_device() function Hans de Goede
2023-07-06 9:19 ` Andy Shevchenko
2023-07-06 12:29 ` Hans de Goede
2023-07-06 12:40 ` Andy Shevchenko
2023-07-06 13:26 ` Rafael J. Wysocki
2023-07-06 13:28 ` Hans de Goede
2023-07-06 13:31 ` Andy Shevchenko
2023-07-05 21:30 ` [PATCH v3 16/18] media: atomisp: csi2-bridge: Switch to new common ipu_bridge_init() Hans de Goede
2023-07-05 21:30 ` [PATCH v3 17/18] media: atomisp: csi2-bridge: Add dev_name() to acpi_handle_info() logging Hans de Goede
2023-07-06 10:09 ` Andy Shevchenko
2023-07-06 11:12 ` Laurent Pinchart
2023-07-06 12:23 ` Andy Shevchenko
2023-07-06 13:07 ` Laurent Pinchart
2023-07-06 13:22 ` Andy Shevchenko
2023-07-06 13:43 ` Sakari Ailus
2023-07-05 21:30 ` [PATCH v3 18/18] media: atomisp: csi2-bridge: Add support for VCM I2C-client instantiation Hans de Goede
2023-07-06 10:15 ` Andy Shevchenko
2023-07-06 12:31 ` Hans de Goede
2023-07-06 12:42 ` Andy Shevchenko
2023-07-06 12:47 ` Hans de Goede
2023-07-06 12:56 ` Andy Shevchenko
2023-07-06 12:58 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230705213010.390849-5-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=bingbu.cao@intel.com \
--cc=dan.scally@ideasonboard.com \
--cc=hao.yao@intel.com \
--cc=hpa@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox