From patchwork Fri Jun 30 11:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13298055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D4E6EB64D7 for ; Fri, 30 Jun 2023 11:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbjF3LIV (ORCPT ); Fri, 30 Jun 2023 07:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbjF3LIJ (ORCPT ); Fri, 30 Jun 2023 07:08:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7241F3582 for ; Fri, 30 Jun 2023 04:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688123218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bgYjK3Z8dOQLef3/O1w5H+f/EBXBlR+VipNZMJ19HMA=; b=AYwB7rXVVoJY/qTP9Wsc3XYFsREpGPmRON8AKN/yQu0OcpXv9v4YFLt27eRlAExeQCKAfO +IVHlNDSoL0mE03tt0JDNVy69fXb96ARfXWiyYk+e6Tte/xCYSgLjYbnBUa5cs53WZ8jWc VXd+4sQJlrvLoYYJk5pFrN0i3n91ab0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-34-zauLKHu6MI6sABleQC_yHg-1; Fri, 30 Jun 2023 07:06:55 -0400 X-MC-Unique: zauLKHu6MI6sABleQC_yHg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8F7C185A7A5; Fri, 30 Jun 2023 11:06:54 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.193.184]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32B56492B02; Fri, 30 Jun 2023 11:06:52 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Laurent Pinchart , Daniel Scally Cc: Hans de Goede , Mauro Carvalho Chehab , Andy Shevchenko , Kate Hsuan , Hao Yao , Bingbu Cao , linux-media@vger.kernel.org Subject: [PATCH v2 04/15] media: ipu-bridge: Allow building as module Date: Fri, 30 Jun 2023 13:06:32 +0200 Message-ID: <20230630110643.209761-5-hdegoede@redhat.com> In-Reply-To: <20230630110643.209761-1-hdegoede@redhat.com> References: <20230630110643.209761-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org After commit f54eb0ac7c1a ("media: ipu3-cio2: rename cio2 bridge to ipu bridge and move out of ipu3") the ipu-bridge code is always builtin even if all (its only) 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 --- drivers/media/pci/intel/Kconfig | 19 ++----------------- drivers/media/pci/intel/ipu-bridge.c | 4 ++++ drivers/media/pci/intel/ipu3/Kconfig | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index 64a29b0b7033..d4d723591475 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -1,21 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config IPU_BRIDGE - bool "Intel IPU Sensors Bridge" - depends on VIDEO_IPU3_CIO2 && 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. + tristate + depends on ACPI && I2C 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 "); +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.