From patchwork Wed Apr 15 09:49:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 210189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A993C2BA19 for ; Wed, 15 Apr 2020 09:49:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38B062078A for ; Wed, 15 Apr 2020 09:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586944189; bh=BMCAYOBEXBk7709Ogb1+PRVp1vR+ZXuSQgMdbDqEF2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VCMsaq4Py1+/YAcAk1+6SDddDlALvrwYaB+fEIWAuj4fLPewUS0W6pLmU3B2yOO56 tHQaEGQKYHa+QCoKLo55MGxdUMVRth0z00jDPuKg6bDtHgti/cefXwRNp0OcVY4tei Bo4eSkmFE1nlbErfKgH93j8MjvUoPc2n2bA3n4iM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895872AbgDOJtl (ORCPT ); Wed, 15 Apr 2020 05:49:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2895863AbgDOJtc (ORCPT ); Wed, 15 Apr 2020 05:49:32 -0400 Received: from mail.kernel.org (ip5f5ad4d8.dynamic.kabel-deutschland.de [95.90.212.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E6A920775; Wed, 15 Apr 2020 09:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586944170; bh=BMCAYOBEXBk7709Ogb1+PRVp1vR+ZXuSQgMdbDqEF2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JxQfj4mEW6ybZNAqkINSATkXx7qyu38aUl7MkG0+b3HQWHHSsUUnuxvCXUe8a6A/v kdkyx3sND48bNGP5581afrFmpgQb037m9JzXfhy3MBPb/GYlBCEqtjNT2aTLa5qe8C BmT0aVShF2e6XfjcMm+7B2/EziMXPoMoKLrnqv1w= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1jOefg-006WIO-1s; Wed, 15 Apr 2020 11:49:28 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Hans Verkuil Subject: [PATCH 2/4] media: place CEC menu before MEDIA_SUPPORT Date: Wed, 15 Apr 2020 11:49:25 +0200 Message-Id: <32565659d6778e92bd9ac7d17622149bd95973c5.1586944045.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The only item that opens at the CEC Kconfig menu is related to Remote Controller. Also, its support should not depend on media support, so it makes sense to keep both RC and CEC together. After this change, the main media menus that are visible under "Device Drivers" menu are: <*> Remote Controller support ---> [ ] HDMI CEC RC integration (NEW) < > HDMI CEC drivers Multimedia support ---> Signed-off-by: Mauro Carvalho Chehab --- drivers/media/Kconfig | 30 ++---------------------------- drivers/media/cec/Kconfig | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index e8bd354a0f75..8694e3c6d183 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -4,19 +4,10 @@ # # -# NOTE: Those symbols can't depend on MEDIA_SUPPORT, as it would cause -# unmatched dependencies +# NOTE: CEC and Remote Controller support should not depend on MEDIA_SUPPORT # -config CEC_CORE - tristate - -config CEC_NOTIFIER - bool - -config CEC_PIN - bool - source "drivers/media/rc/Kconfig" +source "drivers/media/cec/Kconfig" menuconfig MEDIA_SUPPORT tristate "Multimedia support" @@ -132,17 +123,6 @@ config MEDIA_SDR_SUPPORT Say Y when you have a software defined radio device. -config MEDIA_CEC_SUPPORT - bool - prompt "HDMI CEC support" if MEDIA_SUPPORT_FILTER - default y if !MEDIA_SUPPORT_FILTER - help - Enable support for HDMI CEC (Consumer Electronics Control), - which is an optional HDMI feature. - - Say Y when you have an HDMI receiver, transmitter or a USB CEC - adapter that supports HDMI CEC. - config MEDIA_PLATFORM_SUPPORT bool prompt "Platform-specific devices" if MEDIA_SUPPORT_FILTER @@ -232,12 +212,6 @@ menu "Digital TV options" source "drivers/media/dvb-core/Kconfig" endmenu -menu "HDMI CEC options" - visible if CEC_CORE - -source "drivers/media/cec/Kconfig" -endmenu - menu "Media drivers" comment "Drivers filtered as selected at 'Filter media drivers'" diff --git a/drivers/media/cec/Kconfig b/drivers/media/cec/Kconfig index c01919713ab9..1586dd899302 100644 --- a/drivers/media/cec/Kconfig +++ b/drivers/media/cec/Kconfig @@ -1,4 +1,13 @@ # SPDX-License-Identifier: GPL-2.0-only +config CEC_CORE + tristate + +config CEC_NOTIFIER + bool + +config CEC_PIN + bool + config MEDIA_CEC_RC bool "HDMI CEC RC integration" depends on CEC_CORE && RC_CORE @@ -11,3 +20,14 @@ config CEC_PIN_ERROR_INJ depends on CEC_PIN && DEBUG_FS help This option enables CEC error injection using debugfs. + +config MEDIA_CEC_SUPPORT + bool + prompt "HDMI CEC drivers" + default y if !MEDIA_SUPPORT_FILTER + help + Enable support for HDMI CEC (Consumer Electronics Control), + which is an optional HDMI feature. + + Say Y when you have an HDMI receiver, transmitter or a USB CEC + adapter that supports HDMI CEC. From patchwork Wed Apr 15 09:49:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 210187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B2CC2BA19 for ; Wed, 15 Apr 2020 09:53:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6AD8D20784 for ; Wed, 15 Apr 2020 09:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586944400; bh=xdz3RoKumpaxvestZt1SahUleekGW1uaan639E4vNCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pEYM8CI5hDz5iNtOSYWuizNr22ExwobpcJTnKswds0ATaPBuVX9YWYEaTDLpfoOPE +KU5dctVRduV5tzEUqj9aFznC2+xhqULS6VDzGJvu9wBDlm0lwNy0ENMB+ybMcCyc1 nKZmqawCtiNEbg1kMiuYNWn8msqzpGIeOM5OuzJI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2896078AbgDOJxR (ORCPT ); Wed, 15 Apr 2020 05:53:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2895864AbgDOJtc (ORCPT ); Wed, 15 Apr 2020 05:49:32 -0400 Received: from mail.kernel.org (ip5f5ad4d8.dynamic.kabel-deutschland.de [95.90.212.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E6C820784; Wed, 15 Apr 2020 09:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586944170; bh=xdz3RoKumpaxvestZt1SahUleekGW1uaan639E4vNCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RE0X8/2tPzHLv0AIf+hdmret8Oew+SjDFG6NT5FMKAytRdI3ztwaVhNiI5dKjiKKv QhcdtNh6k9n1LP1MXAMoHZB2XRa+Kj8N7yH13E2uP58ZB6NqCDfWl3sABUwujp8TOI rOsQ0Ku+Yb+2nGsZU1pwarMj8YkJ10TBuOWcO7Kc= Received: from mchehab by mail.kernel.org with local (Exim 4.92.3) (envelope-from ) id 1jOefg-006WIa-4z; Wed, 15 Apr 2020 11:49:28 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Hans Verkuil Subject: [PATCH 4/4] media: move CEC USB drivers to a separate directory Date: Wed, 15 Apr 2020 11:49:27 +0200 Message-Id: X-Mailer: git-send-email 2.25.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org As CEC support doesn't depend on MEDIA_SUPPORT, let's place the platform drivers outside the media menu. As a side effect, instead of depends on USB, drivers just select it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/cec/Kconfig | 1 + drivers/media/cec/Makefile | 2 +- drivers/media/cec/usb/Kconfig | 6 ++++++ drivers/media/cec/usb/Makefile | 6 ++++++ drivers/media/{usb/pulse8-cec => cec/usb/pulse8}/Kconfig | 3 ++- drivers/media/{usb/pulse8-cec => cec/usb/pulse8}/Makefile | 0 .../media/{usb/pulse8-cec => cec/usb/pulse8}/pulse8-cec.c | 0 .../{usb/rainshadow-cec => cec/usb/rainshadow}/Kconfig | 3 ++- .../{usb/rainshadow-cec => cec/usb/rainshadow}/Makefile | 0 .../rainshadow-cec => cec/usb/rainshadow}/rainshadow-cec.c | 0 drivers/media/usb/Kconfig | 6 ------ drivers/media/usb/Makefile | 2 -- 12 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 drivers/media/cec/usb/Kconfig create mode 100644 drivers/media/cec/usb/Makefile rename drivers/media/{usb/pulse8-cec => cec/usb/pulse8}/Kconfig (91%) rename drivers/media/{usb/pulse8-cec => cec/usb/pulse8}/Makefile (100%) rename drivers/media/{usb/pulse8-cec => cec/usb/pulse8}/pulse8-cec.c (100%) rename drivers/media/{usb/rainshadow-cec => cec/usb/rainshadow}/Kconfig (92%) rename drivers/media/{usb/rainshadow-cec => cec/usb/rainshadow}/Makefile (100%) rename drivers/media/{usb/rainshadow-cec => cec/usb/rainshadow}/rainshadow-cec.c (100%) diff --git a/drivers/media/cec/Kconfig b/drivers/media/cec/Kconfig index 7b1fb70066bd..eea74b7cfa8c 100644 --- a/drivers/media/cec/Kconfig +++ b/drivers/media/cec/Kconfig @@ -34,4 +34,5 @@ menuconfig MEDIA_CEC_SUPPORT if MEDIA_CEC_SUPPORT source "drivers/media/cec/platform/Kconfig" +source "drivers/media/cec/usb/Kconfig" endif diff --git a/drivers/media/cec/Makefile b/drivers/media/cec/Makefile index 8c6448bee386..74e80e1b3571 100644 --- a/drivers/media/cec/Makefile +++ b/drivers/media/cec/Makefile @@ -1,2 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += core/ platform/ +obj-y += core/ platform/ usb/ diff --git a/drivers/media/cec/usb/Kconfig b/drivers/media/cec/usb/Kconfig new file mode 100644 index 000000000000..d3bbef464bdb --- /dev/null +++ b/drivers/media/cec/usb/Kconfig @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# USB drivers + +source "drivers/media/cec/usb/pulse8/Kconfig" +source "drivers/media/cec/usb/rainshadow/Kconfig" diff --git a/drivers/media/cec/usb/Makefile b/drivers/media/cec/usb/Makefile new file mode 100644 index 000000000000..e4183d1bfa9a --- /dev/null +++ b/drivers/media/cec/usb/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the CEC USB device drivers. +# +obj-$(CONFIG_USB_PULSE8_CEC) += pulse8/ +obj-$(CONFIG_USB_RAINSHADOW_CEC) += rainshadow/ diff --git a/drivers/media/usb/pulse8-cec/Kconfig b/drivers/media/cec/usb/pulse8/Kconfig similarity index 91% rename from drivers/media/usb/pulse8-cec/Kconfig rename to drivers/media/cec/usb/pulse8/Kconfig index e802d30dbbee..a0224ef80e6c 100644 --- a/drivers/media/usb/pulse8-cec/Kconfig +++ b/drivers/media/cec/usb/pulse8/Kconfig @@ -1,8 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only config USB_PULSE8_CEC tristate "Pulse Eight HDMI CEC" - depends on USB_ACM select CEC_CORE + select USB + select USB_ACM select SERIO select SERIO_SERPORT help diff --git a/drivers/media/usb/pulse8-cec/Makefile b/drivers/media/cec/usb/pulse8/Makefile similarity index 100% rename from drivers/media/usb/pulse8-cec/Makefile rename to drivers/media/cec/usb/pulse8/Makefile diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/cec/usb/pulse8/pulse8-cec.c similarity index 100% rename from drivers/media/usb/pulse8-cec/pulse8-cec.c rename to drivers/media/cec/usb/pulse8/pulse8-cec.c diff --git a/drivers/media/usb/rainshadow-cec/Kconfig b/drivers/media/cec/usb/rainshadow/Kconfig similarity index 92% rename from drivers/media/usb/rainshadow-cec/Kconfig rename to drivers/media/cec/usb/rainshadow/Kconfig index b481c5157d7e..c9ef2c192b17 100644 --- a/drivers/media/usb/rainshadow-cec/Kconfig +++ b/drivers/media/cec/usb/rainshadow/Kconfig @@ -1,8 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only config USB_RAINSHADOW_CEC tristate "RainShadow Tech HDMI CEC" - depends on USB_ACM select CEC_CORE + select USB + select USB_ACM select SERIO select SERIO_SERPORT help diff --git a/drivers/media/usb/rainshadow-cec/Makefile b/drivers/media/cec/usb/rainshadow/Makefile similarity index 100% rename from drivers/media/usb/rainshadow-cec/Makefile rename to drivers/media/cec/usb/rainshadow/Makefile diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/cec/usb/rainshadow/rainshadow-cec.c similarity index 100% rename from drivers/media/usb/rainshadow-cec/rainshadow-cec.c rename to drivers/media/cec/usb/rainshadow/rainshadow-cec.c diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig index bf08393e38d1..00feadb217d8 100644 --- a/drivers/media/usb/Kconfig +++ b/drivers/media/usb/Kconfig @@ -66,11 +66,5 @@ source "drivers/media/usb/hackrf/Kconfig" source "drivers/media/usb/msi2500/Kconfig" endif -if MEDIA_CEC_SUPPORT - comment "USB HDMI CEC adapters" -source "drivers/media/usb/pulse8-cec/Kconfig" -source "drivers/media/usb/rainshadow-cec/Kconfig" -endif - endif #MEDIA_USB_SUPPORT endif #USB diff --git a/drivers/media/usb/Makefile b/drivers/media/usb/Makefile index 169aa07c97bd..3eaff3149ef4 100644 --- a/drivers/media/usb/Makefile +++ b/drivers/media/usb/Makefile @@ -24,5 +24,3 @@ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/ obj-$(CONFIG_VIDEO_USBTV) += usbtv/ obj-$(CONFIG_VIDEO_GO7007) += go7007/ obj-$(CONFIG_DVB_AS102) += as102/ -obj-$(CONFIG_USB_PULSE8_CEC) += pulse8-cec/ -obj-$(CONFIG_USB_RAINSHADOW_CEC) += rainshadow-cec/