From patchwork Mon Apr 24 08:29:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 13221840 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 569E8C77B61 for ; Mon, 24 Apr 2023 08:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Qhi/vjqoQjLL0RthVLJbTMnaPaeNawVwgn1GjOWdv+k=; b=BJwdQ6J3y+hdcs g/ocg6kSMa6exjpd4WkRtLNre7RCYXpmpUiD5DOK0A9rKkL3vUYPHLQ2KZ70JcnXhRrHb3aM9u/FA /aK1OKrqcqS8DQgKy4DuEZOLBExS/7Ue8xqJWFebkoegE+wzg1epGjOZ9wf1KoKBiteEZiF75fKNp ckfrgbLR2F6y8BcFsvqHCpT18wSnBfvEzgL0966bErM2xJMsvV2k7gbyyRQIqgX4R/NmvP2WxSsJv zl4s/61WBV5xu3qDDPRfU0BV3j5lecyPXvTv7BaoZZTRhziouKcTwAzCXLBWbM8S5ZL2nAUJlx2yn gTlr4++4ReAVqZAhkmMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqrbG-00FhGf-0P; Mon, 24 Apr 2023 08:31:06 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqrb8-00FhGK-34 for linux-arm-kernel@lists.infradead.org; Mon, 24 Apr 2023 08:31:04 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 1BA80E126D; Mon, 24 Apr 2023 01:30:23 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OQNp4Wng5lcs; Mon, 24 Apr 2023 01:30:17 -0700 (PDT) From: Martin Kepplinger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1682325017; bh=1YtoU58GRKmxuR/4dCxeVqokfEQvi2oTrrPDApVPVK8=; h=From:To:Cc:Subject:Date:From; b=qsuNnUxj1lIV/NgI+l9t/C5vCtbOg0DuXGrWO79JQKrafrPgcnxgX6/uTv4xmxsFB skmytIbNH8zSgoLtzgnjbnlmKXV/SEce86VbdsLhWhPRBUBLRayAsdAHvjh1dWw22I KwqNzf+JSU7VakbV3Obu2V3bEAZsGmoGaw+LMYdRO+jJj4jByBgb0pxAY9WioPxIc2 FULkxhExbxMttJkGa5nYhCjPSxTXcUWO624T1Gv3l3eX0cI4+jzNiXisVyl9juQ8tI 1LphlousT6CLE3c1V1fRPFTdWDQqoYxMgsMaO7NH4kCso+6ABzYee1zJUPst9FW4j5 4nAIugF4Bz3Tg== To: mchehab@kernel.org, shawnguo@kernel.org, festevam@gmail.com, slongerbeam@gmail.com, gregkh@linuxfoundation.org, laurent.pinchart@ideasonboard.com, hverkuil-cisco@xs4all.nl, rmfrfs@gmail.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, kernel@puri.sm, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kepplinger Subject: [PATCH] media: imx: Unstage the imx8mq-mipi-csi2 driver Date: Mon, 24 Apr 2023 10:29:45 +0200 Message-Id: <20230424082945.2580298-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230424_013059_017331_5AFF0197 X-CRM114-Status: GOOD ( 14.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The imx8mq-mipi-csi2 mipi receiver driver is used and maintained. There is no reason to keep it in staging. The accompanying CSI bridge driver that uses it is in drivers/media/platform/nxp as well. One TODO is to get rid of csi_state's "state" and "lock" variables. Especially make sure suspend/resume is working without them. That can very well be worked on from the new location. Add a MAINTAINERS section for the imx8mq-mipi-csi2 mipi receiver driver. It shares the CSI Bridge driver with the one from imx7 and imx8mm so the sections overlap a bit. Signed-off-by: Martin Kepplinger --- MAINTAINERS | 13 +++++++++++++ drivers/media/platform/nxp/Kconfig | 11 +++++++++++ drivers/media/platform/nxp/Makefile | 1 + .../imx => media/platform/nxp}/imx8mq-mipi-csi2.c | 0 drivers/staging/media/imx/Kconfig | 12 +----------- drivers/staging/media/imx/Makefile | 2 -- 6 files changed, 26 insertions(+), 13 deletions(-) rename drivers/{staging/media/imx => media/platform/nxp}/imx8mq-mipi-csi2.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index f50945bb7d1b..fcd48408fc1f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12919,6 +12919,19 @@ F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml F: drivers/media/platform/nxp/imx-mipi-csis.c F: drivers/media/platform/nxp/imx7-media-csi.c +MEDIA DRIVERS FOR FREESCALE IMX8MQ +M: Martin Kepplinger +R: Laurent Pinchart +R: Purism Kernel Team +L: linux-media@vger.kernel.org +S: Maintained +T: git git://linuxtv.org/media_tree.git +F: Documentation/admin-guide/media/imx7.rst +F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml +F: Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml +F: drivers/media/platform/nxp/imx7-media-csi.c +F: drivers/media/platform/nxp/imx8mq-mipi-csi.c + MEDIA DRIVERS FOR HELENE M: Abylay Ospan L: linux-media@vger.kernel.org diff --git a/drivers/media/platform/nxp/Kconfig b/drivers/media/platform/nxp/Kconfig index a0ca6b297fb8..efa985ec8a5f 100644 --- a/drivers/media/platform/nxp/Kconfig +++ b/drivers/media/platform/nxp/Kconfig @@ -28,6 +28,17 @@ config VIDEO_IMX_MIPI_CSIS Video4Linux2 sub-device driver for the MIPI CSI-2 CSIS receiver v3.3/v3.6.3 found on some i.MX7 and i.MX8 SoCs. +config VIDEO_IMX8MQ_MIPI_CSI2 + tristate "NXP i.MX8MQ MIPI CSI-2 receiver" + depends on ARCH_MXC || COMPILE_TEST + depends on VIDEO_DEV + select MEDIA_CONTROLLER + select V4L2_FWNODE + select VIDEO_V4L2_SUBDEV_API + help + Video4Linux2 driver for the MIPI CSI-2 receiver found on the i.MX8MQ + SoC. The i.MX8MQ CSI Bridge is the same as on i.MX7. + source "drivers/media/platform/nxp/imx8-isi/Kconfig" # mem2mem drivers diff --git a/drivers/media/platform/nxp/Makefile b/drivers/media/platform/nxp/Makefile index b8e672b75fed..4d90eb713652 100644 --- a/drivers/media/platform/nxp/Makefile +++ b/drivers/media/platform/nxp/Makefile @@ -5,6 +5,7 @@ obj-y += imx-jpeg/ obj-y += imx8-isi/ obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o +obj-$(CONFIG_VIDEO_IMX8MQ_MIPI_CSI2) += imx8mq-mipi-csi2.o obj-$(CONFIG_VIDEO_IMX_MIPI_CSIS) += imx-mipi-csis.o obj-$(CONFIG_VIDEO_IMX_PXP) += imx-pxp.o obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o diff --git a/drivers/staging/media/imx/imx8mq-mipi-csi2.c b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c similarity index 100% rename from drivers/staging/media/imx/imx8mq-mipi-csi2.c rename to drivers/media/platform/nxp/imx8mq-mipi-csi2.c diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index 21fd79515042..5b393e29d29e 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -15,7 +15,7 @@ config VIDEO_IMX_MEDIA driver for the i.MX5/6 SOC. if VIDEO_IMX_MEDIA -menu "i.MX5/6/7/8 Media Sub devices" +menu "i.MX5/6 Media Sub devices" config VIDEO_IMX_CSI tristate "i.MX5/6 Camera Sensor Interface driver" @@ -25,13 +25,3 @@ config VIDEO_IMX_CSI A video4linux camera sensor interface driver for i.MX5/6. endmenu endif - -config VIDEO_IMX8MQ_MIPI_CSI2 - tristate "NXP i.MX8MQ MIPI CSI-2 receiver" - depends on ARCH_MXC || COMPILE_TEST - depends on VIDEO_DEV - select MEDIA_CONTROLLER - select V4L2_FWNODE - select VIDEO_V4L2_SUBDEV_API - help - V4L2 driver for the MIPI CSI-2 receiver found in the i.MX8MQ SoC. diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index 906a422aa656..b69951deff9a 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -13,5 +13,3 @@ obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media-common.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-media.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-media-csi.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-mipi-csi2.o - -obj-$(CONFIG_VIDEO_IMX8MQ_MIPI_CSI2) += imx8mq-mipi-csi2.o