linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/22] Reorganize media Kconfig
@ 2020-03-25  9:49 Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 01/22] media: dvb-usb: auto-select CYPRESS_FIRMWARE Mauro Carvalho Chehab
                   ` (21 more replies)
  0 siblings, 22 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Helen Koike, Hans Verkuil, Mike Isely,
	Sakari Ailus, Laurent Pinchart, Stefan Richter, linux1394-devel,
	Andy Walls, Shuah Khan

This patch series do lots of reorg at the media Kconfig options.
It also move test drivers from platform dir to a new one.

After this change, the main config is organized on menus, allowing to
select:

	- type of devices selection - the filtering options
	- Media core options - with API and other core stuff
	- Media core extra options
	- Media drivers
	- Media ancillary drivers

The "type of devices" menu has the filtering options for:

	- Cameras and video grabbers
	- Analog TV
	- Digital TV
	- AM/FM radio receivers/transmitters
	- SDR
	- CEC
	- Embeded devices (SoC)
	- Test drivers

This way, one interested only on embedded devices can unselect
everything but "Embedded devices (SoC)" option.

Distros for PC/Laptops can enable everything but 
"Embedded devices (SoC)" and "Test drivers".

Users can select just what they want, without bothering with
hundreds of options that he won't have any clue about their
meanings.

-

v3: 

  - as suggested by Ezequiel, fix dependencies for M2M and use
    MEDIA_PLATFORM_SUPPORT to cover all platform drivers;
  - Fix a longstanding issue related to hybrid devices filtering:
    for those, both DVB and V4L cores are needed.

    (well, in fact, it could be fine-grained, but that may require
     some changes inside some drivers, so let's postpone such
     changes for some future patch series)

Mauro Carvalho Chehab (22):
  media: dvb-usb: auto-select CYPRESS_FIRMWARE
  media: Kconfig: add an option to filter in/out platform drivers
  media: Kconfig: not all V4L2 platform drivers are for camera
  media: pci: move VIDEO_PCI_SKELETON to a different Kconfig
  media: reorganize the drivers menu options
  media: Kconfig: update the MEDIA_SUPPORT help message
  media: Kconfig: use a sub-menu to select supported devices
  media: split test drivers from platform directory
  media: Kconfig: make filtering devices optional
  media: Kconfig: move CEC-specific options to cec/Kconfig
  media: Kconfig: move comment to siano include
  media: Kconfig: move DVB-specific options to dvb-core/Kconfig
  media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig
  media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var
  media: Kconfig: move media controller core select to main Kconfig
  media: Kconfig: better organize menu items
  media: Kconfig: mode firewire comment to firewire/Kconfig
  media: Kconfig: place all options under a sub-menu
  media: Kconfig: move the position of sub-driver autoselection
  media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering
  media: Kconfig: simplify some dependencies
  media: Kconfig: better support hybrid TV devices

 drivers/media/Kconfig                         | 239 +++++++++---------
 drivers/media/cec/Kconfig                     |  10 +
 drivers/media/common/Kconfig                  |   2 +-
 drivers/media/dvb-core/Kconfig                |  26 ++
 drivers/media/firewire/Kconfig                |   5 +-
 drivers/media/mc/Kconfig                      |   9 -
 drivers/media/mmc/Kconfig                     |   1 -
 drivers/media/mmc/siano/Kconfig               |   2 +
 drivers/media/pci/Kconfig                     |  21 +-
 drivers/media/pci/bt8xx/Kconfig               |   5 +-
 drivers/media/pci/cx18/Kconfig                |   2 +-
 drivers/media/pci/cx23885/Kconfig             |   4 +-
 drivers/media/pci/cx88/Kconfig                |   4 +-
 drivers/media/pci/saa7134/Kconfig             |   4 +-
 drivers/media/pci/saa7164/Kconfig             |   2 +-
 drivers/media/platform/Kconfig                |  26 --
 drivers/media/platform/Makefile               |   5 -
 drivers/media/test_drivers/Kconfig            |  28 ++
 drivers/media/test_drivers/Makefile           |   9 +
 .../vicodec/Kconfig                           |   0
 .../vicodec/Makefile                          |   0
 .../vicodec/codec-fwht.c                      |   0
 .../vicodec/codec-fwht.h                      |   0
 .../vicodec/codec-v4l2-fwht.c                 |   0
 .../vicodec/codec-v4l2-fwht.h                 |   0
 .../vicodec/vicodec-core.c                    |   0
 .../media/{platform => test_drivers}/vim2m.c  |   0
 .../{platform => test_drivers}/vimc/Kconfig   |   0
 .../{platform => test_drivers}/vimc/Makefile  |   0
 .../vimc/vimc-capture.c                       |   0
 .../vimc/vimc-common.c                        |   0
 .../vimc/vimc-common.h                        |   0
 .../vimc/vimc-core.c                          |   0
 .../vimc/vimc-debayer.c                       |   0
 .../vimc/vimc-scaler.c                        |   0
 .../vimc/vimc-sensor.c                        |   0
 .../vimc/vimc-streamer.c                      |   0
 .../vimc/vimc-streamer.h                      |   0
 .../{platform => test_drivers}/vivid/Kconfig  |   0
 .../{platform => test_drivers}/vivid/Makefile |   0
 .../vivid/vivid-cec.c                         |   0
 .../vivid/vivid-cec.h                         |   0
 .../vivid/vivid-core.c                        |   0
 .../vivid/vivid-core.h                        |   0
 .../vivid/vivid-ctrls.c                       |   0
 .../vivid/vivid-ctrls.h                       |   0
 .../vivid/vivid-kthread-cap.c                 |   0
 .../vivid/vivid-kthread-cap.h                 |   0
 .../vivid/vivid-kthread-out.c                 |   0
 .../vivid/vivid-kthread-out.h                 |   0
 .../vivid/vivid-kthread-touch.c               |   0
 .../vivid/vivid-kthread-touch.h               |   0
 .../vivid/vivid-meta-cap.c                    |   0
 .../vivid/vivid-meta-cap.h                    |   0
 .../vivid/vivid-meta-out.c                    |   0
 .../vivid/vivid-meta-out.h                    |   0
 .../vivid/vivid-osd.c                         |   0
 .../vivid/vivid-osd.h                         |   0
 .../vivid/vivid-radio-common.c                |   0
 .../vivid/vivid-radio-common.h                |   0
 .../vivid/vivid-radio-rx.c                    |   0
 .../vivid/vivid-radio-rx.h                    |   0
 .../vivid/vivid-radio-tx.c                    |   0
 .../vivid/vivid-radio-tx.h                    |   0
 .../vivid/vivid-rds-gen.c                     |   0
 .../vivid/vivid-rds-gen.h                     |   0
 .../vivid/vivid-sdr-cap.c                     |   0
 .../vivid/vivid-sdr-cap.h                     |   0
 .../vivid/vivid-touch-cap.c                   |   0
 .../vivid/vivid-touch-cap.h                   |   0
 .../vivid/vivid-vbi-cap.c                     |   0
 .../vivid/vivid-vbi-cap.h                     |   0
 .../vivid/vivid-vbi-gen.c                     |   0
 .../vivid/vivid-vbi-gen.h                     |   0
 .../vivid/vivid-vbi-out.c                     |   0
 .../vivid/vivid-vbi-out.h                     |   0
 .../vivid/vivid-vid-cap.c                     |   0
 .../vivid/vivid-vid-cap.h                     |   0
 .../vivid/vivid-vid-common.c                  |   0
 .../vivid/vivid-vid-common.h                  |   0
 .../vivid/vivid-vid-out.c                     |   0
 .../vivid/vivid-vid-out.h                     |   0
 drivers/media/usb/Kconfig                     |  14 +-
 drivers/media/usb/au0828/Kconfig              |   6 +-
 drivers/media/usb/cx231xx/Kconfig             |   4 +-
 drivers/media/usb/dvb-usb/Kconfig             |   1 +
 drivers/media/usb/pvrusb2/Kconfig             |   4 +-
 drivers/media/usb/tm6000/Kconfig              |   4 +-
 drivers/media/v4l2-core/Kconfig               |  19 +-
 89 files changed, 261 insertions(+), 195 deletions(-)
 create mode 100644 drivers/media/test_drivers/Kconfig
 create mode 100644 drivers/media/test_drivers/Makefile
 rename drivers/media/{platform => test_drivers}/vicodec/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.c (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.h (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.c (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.h (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/vicodec-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vim2m.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vimc/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-capture.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-debayer.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-scaler.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-sensor.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vivid/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-core.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.h (100%)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v3 01/22] media: dvb-usb: auto-select CYPRESS_FIRMWARE
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 02/22] media: Kconfig: add an option to filter in/out platform drivers Mauro Carvalho Chehab
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

At least some of the supported boards by dvb-usb
driver need to load the cypress firmware, so select
it, as otherwise missing dependencies may popup.

Also, as the cypress firmware load routines are needed
only by the dvb-usb, dvb-usb-v2 and go7007 drivers, and
those all (now) select it, there's no need to ask the
user for manually select it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/common/Kconfig      | 2 +-
 drivers/media/usb/dvb-usb/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/common/Kconfig b/drivers/media/common/Kconfig
index 1990b7f09454..4ea03b7899a8 100644
--- a/drivers/media/common/Kconfig
+++ b/drivers/media/common/Kconfig
@@ -14,7 +14,7 @@ config VIDEO_TVEEPROM
 	depends on I2C
 
 config CYPRESS_FIRMWARE
-	tristate "Cypress firmware helper routines"
+	tristate
 	depends on USB
 
 source "drivers/media/common/videobuf2/Kconfig"
diff --git a/drivers/media/usb/dvb-usb/Kconfig b/drivers/media/usb/dvb-usb/Kconfig
index 1a3e5f965ae4..42334a02cdce 100644
--- a/drivers/media/usb/dvb-usb/Kconfig
+++ b/drivers/media/usb/dvb-usb/Kconfig
@@ -2,6 +2,7 @@
 config DVB_USB
 	tristate "Support for various USB DVB devices"
 	depends on DVB_CORE && USB && I2C && RC_CORE
+	select CYPRESS_FIRMWARE
 	help
 	  By enabling this you will be able to choose the various supported
 	  USB1.1 and USB2.0 DVB devices.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 02/22] media: Kconfig: add an option to filter in/out platform drivers
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 01/22] media: dvb-usb: auto-select CYPRESS_FIRMWARE Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 03/22] media: Kconfig: not all V4L2 platform drivers are for camera Mauro Carvalho Chehab
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

Most systems don't need support for those, while others only
need those, instead of the others.

So, add an option to filter in/out platform drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 9dfea5c4b6ab..03c295a2710a 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -87,6 +87,18 @@ config MEDIA_CEC_SUPPORT
 	  Say Y when you have an HDMI receiver, transmitter or a USB CEC
 	  adapter that supports HDMI CEC.
 
+config MEDIA_PLATFORM_SUPPORT
+	bool "Platform-specific devices"
+	help
+	  Enable support for complex cameras, codecs, and other hardware
+	  that are integrated at the CPU, GPU or on Image Signalling Processor
+	  and don't use PCI, USB or Firewire buses.
+
+	  This is found on Embedded hardware (SoC), on V4L2 codecs and
+	  on some GPU and newer CPU chipsets.
+
+	  Say Y when you want to be able so see such devices.
+
 source "drivers/media/cec/Kconfig"
 
 source "drivers/media/mc/Kconfig"
@@ -161,15 +173,14 @@ source "drivers/media/dvb-core/Kconfig"
 
 comment "Media drivers"
 
-#
-# V4L platform/mem2mem drivers
-#
-
 source "drivers/media/usb/Kconfig"
 source "drivers/media/pci/Kconfig"
+source "drivers/media/radio/Kconfig"
+
+if MEDIA_PLATFORM_SUPPORT
 source "drivers/media/platform/Kconfig"
 source "drivers/media/mmc/Kconfig"
-source "drivers/media/radio/Kconfig"
+endif
 
 comment "Supported FireWire (IEEE 1394) Adapters"
 	depends on DVB_CORE && FIREWIRE
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 03/22] media: Kconfig: not all V4L2 platform drivers are for camera
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 01/22] media: dvb-usb: auto-select CYPRESS_FIRMWARE Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 02/22] media: Kconfig: add an option to filter in/out platform drivers Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 04/22] media: pci: move VIDEO_PCI_SKELETON to a different Kconfig Mauro Carvalho Chehab
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

When the platform drivers got added, they were all part of
complex camera support. This is not the case anymore, as we
now have codecs and other stuff there too.

So, fix the dependencies, in order to not require users to
manually select something that it doesn't make sense.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig          | 3 +--
 drivers/media/platform/Kconfig | 3 ---
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 03c295a2710a..184c7f4f057b 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -111,8 +111,7 @@ source "drivers/media/mc/Kconfig"
 config VIDEO_DEV
 	tristate
 	depends on MEDIA_SUPPORT
-	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
-	default y
+	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
 
 config VIDEO_V4L2_SUBDEV_API
 	bool "V4L2 sub-device userspace API"
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index e01bbb9dd1c1..c4178420d2c5 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -5,7 +5,6 @@
 
 menuconfig V4L_PLATFORM_DRIVERS
 	bool "V4L platform devices"
-	depends on MEDIA_CAMERA_SUPPORT
 	help
 	  Say Y here to enable support for platform-specific V4L drivers.
 
@@ -43,7 +42,6 @@ config VIDEO_ASPEED
 
 config VIDEO_SH_VOU
 	tristate "SuperH VOU video output driver"
-	depends on MEDIA_CAMERA_SUPPORT
 	depends on VIDEO_DEV && I2C
 	depends on ARCH_SHMOBILE || COMPILE_TEST
 	select VIDEOBUF2_DMA_CONTIG
@@ -165,7 +163,6 @@ endif # V4L_PLATFORM_DRIVERS
 menuconfig V4L_MEM2MEM_DRIVERS
 	bool "Memory-to-memory multimedia devices"
 	depends on VIDEO_V4L2
-	depends on MEDIA_CAMERA_SUPPORT
 	help
 	  Say Y here to enable selecting drivers for V4L devices that
 	  use system memory for both source and destination buffers, as opposed
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 04/22] media: pci: move VIDEO_PCI_SKELETON to a different Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 03/22] media: Kconfig: not all V4L2 platform drivers are for camera Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 05/22] media: reorganize the drivers menu options Mauro Carvalho Chehab
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

The V4L2 PCI skeleton is not part of the V4L2 core. Move it
to appear together with the other PCI drivers, at the end,
as this is something that normal users don't even need to
bother.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/pci/Kconfig       | 10 ++++++++++
 drivers/media/v4l2-core/Kconfig | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index dcb3719f440e..9336f8446cf0 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -56,5 +56,15 @@ endif
 
 source "drivers/media/pci/intel/ipu3/Kconfig"
 
+config VIDEO_PCI_SKELETON
+	tristate "Skeleton PCI V4L2 driver"
+	depends on PCI
+	depends on SAMPLES
+	depends on VIDEO_V4L2 && VIDEOBUF2_CORE
+	depends on VIDEOBUF2_MEMOPS && VIDEOBUF2_DMA_CONTIG
+	help
+	  Enable build of the skeleton PCI driver, used as a reference
+	  when developing new drivers.
+
 endif #MEDIA_PCI_SUPPORT
 endif #PCI
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index 39e3fb30ba0b..26276b257eae 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -31,16 +31,6 @@ config VIDEO_FIXED_MINOR_RANGES
 
 	  When in doubt, say N.
 
-config VIDEO_PCI_SKELETON
-	tristate "Skeleton PCI V4L2 driver"
-	depends on PCI
-	depends on SAMPLES
-	depends on VIDEO_V4L2 && VIDEOBUF2_CORE
-	depends on VIDEOBUF2_MEMOPS && VIDEOBUF2_DMA_CONTIG
-	help
-	  Enable build of the skeleton PCI driver, used as a reference
-	  when developing new drivers.
-
 # Used by drivers that need tuner.ko
 config VIDEO_TUNER
 	tristate
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 05/22] media: reorganize the drivers menu options
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 04/22] media: pci: move VIDEO_PCI_SKELETON to a different Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 06/22] media: Kconfig: update the MEDIA_SUPPORT help message Mauro Carvalho Chehab
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

The comments before some of the drivers support look
weird, because their Kconfig have their own "comment"
directive inside it. So, rearrange them to make it
look a little nicer for the ones with are not too
familiar with the media system.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 184c7f4f057b..e2023a268af9 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -176,6 +176,9 @@ source "drivers/media/usb/Kconfig"
 source "drivers/media/pci/Kconfig"
 source "drivers/media/radio/Kconfig"
 
+# Common driver options
+source "drivers/media/common/Kconfig"
+
 if MEDIA_PLATFORM_SUPPORT
 source "drivers/media/platform/Kconfig"
 source "drivers/media/mmc/Kconfig"
@@ -185,9 +188,6 @@ comment "Supported FireWire (IEEE 1394) Adapters"
 	depends on DVB_CORE && FIREWIRE
 source "drivers/media/firewire/Kconfig"
 
-# Common driver options
-source "drivers/media/common/Kconfig"
-
 comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
 
 #
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 06/22] media: Kconfig: update the MEDIA_SUPPORT help message
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 05/22] media: reorganize the drivers menu options Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 07/22] media: Kconfig: use a sub-menu to select supported devices Mauro Carvalho Chehab
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

There are more things than just cameras and TV devices on
media. Update the help message accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index e2023a268af9..6025442dca0d 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -18,8 +18,10 @@ menuconfig MEDIA_SUPPORT
 	tristate "Multimedia support"
 	depends on HAS_IOMEM
 	help
-	  If you want to use Webcams, Video grabber devices and/or TV devices
-	  enable this option and other options below.
+	  If you want to use media devices, including Webcams, Video grabber
+	  devices and/or TV devices, V4L2 codecs, etc, enable this option
+	  and other options below.
+
 	  Additional info and docs are available on the web at
 	  <https://linuxtv.org>
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 07/22] media: Kconfig: use a sub-menu to select supported devices
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (5 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 06/22] media: Kconfig: update the MEDIA_SUPPORT help message Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 08/22] media: split test drivers from platform directory Mauro Carvalho Chehab
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

The media subsystem has hundreds of driver-specific options.
The *_SUPPORT config options work as a sort of filter,
allowing to reduce its complexity for users that won't
want to dig into thousands of options they don't need.

Yet, it the filtering options are becoming large. So, let's
place it on a sub-menu.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig     | 21 ++++++++++++---------
 drivers/media/mmc/Kconfig |  2 +-
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 6025442dca0d..7a3e09e87fe1 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -25,22 +25,21 @@ menuconfig MEDIA_SUPPORT
 	  Additional info and docs are available on the web at
 	  <https://linuxtv.org>
 
-if MEDIA_SUPPORT
-
-comment "Multimedia core support"
+menu "Types of devices to be supported"
+	depends on MEDIA_SUPPORT
 
 #
 # Multimedia support - automatically enable V4L2 and DVB core
 #
 config MEDIA_CAMERA_SUPPORT
-	bool "Cameras/video grabbers support"
+	bool "Cameras and video grabbers"
 	help
 	  Enable support for webcams and video grabbers.
 
 	  Say Y when you have a webcam or a video capture grabber board.
 
 config MEDIA_ANALOG_TV_SUPPORT
-	bool "Analog TV support"
+	bool "Analog TV"
 	help
 	  Enable analog TV support.
 
@@ -52,7 +51,7 @@ config MEDIA_ANALOG_TV_SUPPORT
 		will disable support for them.
 
 config MEDIA_DIGITAL_TV_SUPPORT
-	bool "Digital TV support"
+	bool "Digital TV"
 	help
 	  Enable digital TV support.
 
@@ -60,7 +59,7 @@ config MEDIA_DIGITAL_TV_SUPPORT
 	  hybrid digital TV and analog TV.
 
 config MEDIA_RADIO_SUPPORT
-	bool "AM/FM radio receivers/transmitters support"
+	bool "AM/FM radio receivers/transmitters"
 	help
 	  Enable AM/FM radio support.
 
@@ -74,7 +73,7 @@ config MEDIA_RADIO_SUPPORT
 		disable support for them.
 
 config MEDIA_SDR_SUPPORT
-	bool "Software defined radio support"
+	bool "Software defined radio"
 	help
 	  Enable software defined radio support.
 
@@ -100,6 +99,9 @@ config MEDIA_PLATFORM_SUPPORT
 	  on some GPU and newer CPU chipsets.
 
 	  Say Y when you want to be able so see such devices.
+endmenu # Types of devices to be supported
+
+if MEDIA_SUPPORT
 
 source "drivers/media/cec/Kconfig"
 
@@ -186,7 +188,8 @@ source "drivers/media/platform/Kconfig"
 source "drivers/media/mmc/Kconfig"
 endif
 
-comment "Supported FireWire (IEEE 1394) Adapters"
+
+comment "FireWire (IEEE 1394) Adapters"
 	depends on DVB_CORE && FIREWIRE
 source "drivers/media/firewire/Kconfig"
 
diff --git a/drivers/media/mmc/Kconfig b/drivers/media/mmc/Kconfig
index de0528c6994a..5217f5bd205e 100644
--- a/drivers/media/mmc/Kconfig
+++ b/drivers/media/mmc/Kconfig
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-comment "Supported MMC/SDIO adapters"
+comment "MMC/SDIO adapters"
 source "drivers/media/mmc/siano/Kconfig"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 08/22] media: split test drivers from platform directory
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (6 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 07/22] media: Kconfig: use a sub-menu to select supported devices Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 09/22] media: Kconfig: make filtering devices optional Mauro Carvalho Chehab
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Helen Koike, Shuah Khan

When the first test device was added (vivi.c), there were just
one file. I was too lazy on that time to create a separate
directory just for it, so I kept it together with platform.

Now, we have vivid, vicodec, vim2m and vimc. Also, a new
virtual driver has been prepared to support DVB API.

So, it is time to solve this mess, by placing test stuff
on a separate directory.

It should be noticed that we also have some skeleton drivers
(for V4L and for DVB). For now, we'll keep them separate,
as they're not really test drivers, but instead, just
examples. The DVB frontend ones will likely be part of a new DVB
test driver. By that time, it should make sense to move them
here as well.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig                         | 15 +++++++++-
 drivers/media/platform/Kconfig                | 23 ---------------
 drivers/media/platform/Makefile               |  5 ----
 drivers/media/test_drivers/Kconfig            | 28 +++++++++++++++++++
 drivers/media/test_drivers/Makefile           |  9 ++++++
 .../vicodec/Kconfig                           |  0
 .../vicodec/Makefile                          |  0
 .../vicodec/codec-fwht.c                      |  0
 .../vicodec/codec-fwht.h                      |  0
 .../vicodec/codec-v4l2-fwht.c                 |  0
 .../vicodec/codec-v4l2-fwht.h                 |  0
 .../vicodec/vicodec-core.c                    |  0
 .../media/{platform => test_drivers}/vim2m.c  |  0
 .../{platform => test_drivers}/vimc/Kconfig   |  0
 .../{platform => test_drivers}/vimc/Makefile  |  0
 .../vimc/vimc-capture.c                       |  0
 .../vimc/vimc-common.c                        |  0
 .../vimc/vimc-common.h                        |  0
 .../vimc/vimc-core.c                          |  0
 .../vimc/vimc-debayer.c                       |  0
 .../vimc/vimc-scaler.c                        |  0
 .../vimc/vimc-sensor.c                        |  0
 .../vimc/vimc-streamer.c                      |  0
 .../vimc/vimc-streamer.h                      |  0
 .../{platform => test_drivers}/vivid/Kconfig  |  0
 .../{platform => test_drivers}/vivid/Makefile |  0
 .../vivid/vivid-cec.c                         |  0
 .../vivid/vivid-cec.h                         |  0
 .../vivid/vivid-core.c                        |  0
 .../vivid/vivid-core.h                        |  0
 .../vivid/vivid-ctrls.c                       |  0
 .../vivid/vivid-ctrls.h                       |  0
 .../vivid/vivid-kthread-cap.c                 |  0
 .../vivid/vivid-kthread-cap.h                 |  0
 .../vivid/vivid-kthread-out.c                 |  0
 .../vivid/vivid-kthread-out.h                 |  0
 .../vivid/vivid-kthread-touch.c               |  0
 .../vivid/vivid-kthread-touch.h               |  0
 .../vivid/vivid-meta-cap.c                    |  0
 .../vivid/vivid-meta-cap.h                    |  0
 .../vivid/vivid-meta-out.c                    |  0
 .../vivid/vivid-meta-out.h                    |  0
 .../vivid/vivid-osd.c                         |  0
 .../vivid/vivid-osd.h                         |  0
 .../vivid/vivid-radio-common.c                |  0
 .../vivid/vivid-radio-common.h                |  0
 .../vivid/vivid-radio-rx.c                    |  0
 .../vivid/vivid-radio-rx.h                    |  0
 .../vivid/vivid-radio-tx.c                    |  0
 .../vivid/vivid-radio-tx.h                    |  0
 .../vivid/vivid-rds-gen.c                     |  0
 .../vivid/vivid-rds-gen.h                     |  0
 .../vivid/vivid-sdr-cap.c                     |  0
 .../vivid/vivid-sdr-cap.h                     |  0
 .../vivid/vivid-touch-cap.c                   |  0
 .../vivid/vivid-touch-cap.h                   |  0
 .../vivid/vivid-vbi-cap.c                     |  0
 .../vivid/vivid-vbi-cap.h                     |  0
 .../vivid/vivid-vbi-gen.c                     |  0
 .../vivid/vivid-vbi-gen.h                     |  0
 .../vivid/vivid-vbi-out.c                     |  0
 .../vivid/vivid-vbi-out.h                     |  0
 .../vivid/vivid-vid-cap.c                     |  0
 .../vivid/vivid-vid-cap.h                     |  0
 .../vivid/vivid-vid-common.c                  |  0
 .../vivid/vivid-vid-common.h                  |  0
 .../vivid/vivid-vid-out.c                     |  0
 .../vivid/vivid-vid-out.h                     |  0
 68 files changed, 51 insertions(+), 29 deletions(-)
 create mode 100644 drivers/media/test_drivers/Kconfig
 create mode 100644 drivers/media/test_drivers/Makefile
 rename drivers/media/{platform => test_drivers}/vicodec/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.c (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.h (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.c (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.h (100%)
 rename drivers/media/{platform => test_drivers}/vicodec/vicodec-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vim2m.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vimc/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-capture.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-debayer.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-scaler.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-sensor.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.c (100%)
 rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/Kconfig (100%)
 rename drivers/media/{platform => test_drivers}/vivid/Makefile (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-core.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-core.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.h (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.c (100%)
 rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.h (100%)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 7a3e09e87fe1..0ab3f9946945 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -99,7 +99,19 @@ config MEDIA_PLATFORM_SUPPORT
 	  on some GPU and newer CPU chipsets.
 
 	  Say Y when you want to be able so see such devices.
-endmenu # Types of devices to be supported
+
+config MEDIA_TEST_SUPPORT
+	bool "Test drivers"
+	help
+	  Those drivers should not be used on production Kernels, but
+	  can be useful on debug ones. It enables several dummy drivers
+	  that simulate a real hardware. Very useful to test userspace
+	  applications and to validate if the subsystem core is doesn't
+	  have regressions.
+
+	  Say Y when you have a software defined radio device.
+
+endmenu # media support types
 
 if MEDIA_SUPPORT
 
@@ -182,6 +194,7 @@ source "drivers/media/radio/Kconfig"
 
 # Common driver options
 source "drivers/media/common/Kconfig"
+source "drivers/media/test_drivers/Kconfig"
 
 if MEDIA_PLATFORM_SUPPORT
 source "drivers/media/platform/Kconfig"
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index c4178420d2c5..80028337bf00 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -529,29 +529,6 @@ config VIDEO_TI_SC
 config VIDEO_TI_CSC
 	tristate
 
-menuconfig V4L_TEST_DRIVERS
-	bool "Media test drivers"
-	depends on MEDIA_CAMERA_SUPPORT
-
-if V4L_TEST_DRIVERS
-
-source "drivers/media/platform/vimc/Kconfig"
-
-source "drivers/media/platform/vivid/Kconfig"
-
-config VIDEO_VIM2M
-	tristate "Virtual Memory-to-Memory Driver"
-	depends on VIDEO_DEV && VIDEO_V4L2
-	select VIDEOBUF2_VMALLOC
-	select V4L2_MEM2MEM_DEV
-	help
-	  This is a virtual test device for the memory-to-memory driver
-	  framework.
-
-source "drivers/media/platform/vicodec/Kconfig"
-
-endif #V4L_TEST_DRIVERS
-
 menuconfig DVB_PLATFORM_DRIVERS
 	bool "DVB platform devices"
 	depends on MEDIA_DIGITAL_TV_SUPPORT
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index d13db96e3015..a0194ef1211f 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -14,11 +14,6 @@ obj-$(CONFIG_VIDEO_PXA27x)	+= pxa_camera.o
 
 obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
 
-obj-$(CONFIG_VIDEO_VIMC)		+= vimc/
-obj-$(CONFIG_VIDEO_VIVID)		+= vivid/
-obj-$(CONFIG_VIDEO_VIM2M)		+= vim2m.o
-obj-$(CONFIG_VIDEO_VICODEC)		+= vicodec/
-
 obj-y	+= ti-vpe/
 
 obj-$(CONFIG_VIDEO_MX2_EMMAPRP)		+= mx2_emmaprp.o
diff --git a/drivers/media/test_drivers/Kconfig b/drivers/media/test_drivers/Kconfig
new file mode 100644
index 000000000000..258a4d36c0d3
--- /dev/null
+++ b/drivers/media/test_drivers/Kconfig
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+if MEDIA_TEST_SUPPORT
+
+menuconfig V4L_TEST_DRIVERS
+	bool "V4L test drivers"
+	depends on MEDIA_CAMERA_SUPPORT
+
+if V4L_TEST_DRIVERS
+
+source "drivers/media/test_drivers/vimc/Kconfig"
+
+source "drivers/media/test_drivers/vivid/Kconfig"
+
+config VIDEO_VIM2M
+	tristate "Virtual Memory-to-Memory Driver"
+	depends on VIDEO_DEV && VIDEO_V4L2
+	select VIDEOBUF2_VMALLOC
+	select V4L2_MEM2MEM_DEV
+	help
+	  This is a virtual test device for the memory-to-memory driver
+	  framework.
+
+source "drivers/media/test_drivers/vicodec/Kconfig"
+
+endif #V4L_TEST_DRIVERS
+
+endif #MEDIA_TEST_SUPPORT
diff --git a/drivers/media/test_drivers/Makefile b/drivers/media/test_drivers/Makefile
new file mode 100644
index 000000000000..74410d3a9f2d
--- /dev/null
+++ b/drivers/media/test_drivers/Makefile
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the test drivers.
+#
+
+obj-$(CONFIG_VIDEO_VIMC)		+= vimc/
+obj-$(CONFIG_VIDEO_VIVID)		+= vivid/
+obj-$(CONFIG_VIDEO_VIM2M)		+= vim2m.o
+obj-$(CONFIG_VIDEO_VICODEC)		+= vicodec/
diff --git a/drivers/media/platform/vicodec/Kconfig b/drivers/media/test_drivers/vicodec/Kconfig
similarity index 100%
rename from drivers/media/platform/vicodec/Kconfig
rename to drivers/media/test_drivers/vicodec/Kconfig
diff --git a/drivers/media/platform/vicodec/Makefile b/drivers/media/test_drivers/vicodec/Makefile
similarity index 100%
rename from drivers/media/platform/vicodec/Makefile
rename to drivers/media/test_drivers/vicodec/Makefile
diff --git a/drivers/media/platform/vicodec/codec-fwht.c b/drivers/media/test_drivers/vicodec/codec-fwht.c
similarity index 100%
rename from drivers/media/platform/vicodec/codec-fwht.c
rename to drivers/media/test_drivers/vicodec/codec-fwht.c
diff --git a/drivers/media/platform/vicodec/codec-fwht.h b/drivers/media/test_drivers/vicodec/codec-fwht.h
similarity index 100%
rename from drivers/media/platform/vicodec/codec-fwht.h
rename to drivers/media/test_drivers/vicodec/codec-fwht.h
diff --git a/drivers/media/platform/vicodec/codec-v4l2-fwht.c b/drivers/media/test_drivers/vicodec/codec-v4l2-fwht.c
similarity index 100%
rename from drivers/media/platform/vicodec/codec-v4l2-fwht.c
rename to drivers/media/test_drivers/vicodec/codec-v4l2-fwht.c
diff --git a/drivers/media/platform/vicodec/codec-v4l2-fwht.h b/drivers/media/test_drivers/vicodec/codec-v4l2-fwht.h
similarity index 100%
rename from drivers/media/platform/vicodec/codec-v4l2-fwht.h
rename to drivers/media/test_drivers/vicodec/codec-v4l2-fwht.h
diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/test_drivers/vicodec/vicodec-core.c
similarity index 100%
rename from drivers/media/platform/vicodec/vicodec-core.c
rename to drivers/media/test_drivers/vicodec/vicodec-core.c
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/test_drivers/vim2m.c
similarity index 100%
rename from drivers/media/platform/vim2m.c
rename to drivers/media/test_drivers/vim2m.c
diff --git a/drivers/media/platform/vimc/Kconfig b/drivers/media/test_drivers/vimc/Kconfig
similarity index 100%
rename from drivers/media/platform/vimc/Kconfig
rename to drivers/media/test_drivers/vimc/Kconfig
diff --git a/drivers/media/platform/vimc/Makefile b/drivers/media/test_drivers/vimc/Makefile
similarity index 100%
rename from drivers/media/platform/vimc/Makefile
rename to drivers/media/test_drivers/vimc/Makefile
diff --git a/drivers/media/platform/vimc/vimc-capture.c b/drivers/media/test_drivers/vimc/vimc-capture.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-capture.c
rename to drivers/media/test_drivers/vimc/vimc-capture.c
diff --git a/drivers/media/platform/vimc/vimc-common.c b/drivers/media/test_drivers/vimc/vimc-common.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-common.c
rename to drivers/media/test_drivers/vimc/vimc-common.c
diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/test_drivers/vimc/vimc-common.h
similarity index 100%
rename from drivers/media/platform/vimc/vimc-common.h
rename to drivers/media/test_drivers/vimc/vimc-common.h
diff --git a/drivers/media/platform/vimc/vimc-core.c b/drivers/media/test_drivers/vimc/vimc-core.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-core.c
rename to drivers/media/test_drivers/vimc/vimc-core.c
diff --git a/drivers/media/platform/vimc/vimc-debayer.c b/drivers/media/test_drivers/vimc/vimc-debayer.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-debayer.c
rename to drivers/media/test_drivers/vimc/vimc-debayer.c
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/test_drivers/vimc/vimc-scaler.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-scaler.c
rename to drivers/media/test_drivers/vimc/vimc-scaler.c
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/test_drivers/vimc/vimc-sensor.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-sensor.c
rename to drivers/media/test_drivers/vimc/vimc-sensor.c
diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/test_drivers/vimc/vimc-streamer.c
similarity index 100%
rename from drivers/media/platform/vimc/vimc-streamer.c
rename to drivers/media/test_drivers/vimc/vimc-streamer.c
diff --git a/drivers/media/platform/vimc/vimc-streamer.h b/drivers/media/test_drivers/vimc/vimc-streamer.h
similarity index 100%
rename from drivers/media/platform/vimc/vimc-streamer.h
rename to drivers/media/test_drivers/vimc/vimc-streamer.h
diff --git a/drivers/media/platform/vivid/Kconfig b/drivers/media/test_drivers/vivid/Kconfig
similarity index 100%
rename from drivers/media/platform/vivid/Kconfig
rename to drivers/media/test_drivers/vivid/Kconfig
diff --git a/drivers/media/platform/vivid/Makefile b/drivers/media/test_drivers/vivid/Makefile
similarity index 100%
rename from drivers/media/platform/vivid/Makefile
rename to drivers/media/test_drivers/vivid/Makefile
diff --git a/drivers/media/platform/vivid/vivid-cec.c b/drivers/media/test_drivers/vivid/vivid-cec.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-cec.c
rename to drivers/media/test_drivers/vivid/vivid-cec.c
diff --git a/drivers/media/platform/vivid/vivid-cec.h b/drivers/media/test_drivers/vivid/vivid-cec.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-cec.h
rename to drivers/media/test_drivers/vivid/vivid-cec.h
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/test_drivers/vivid/vivid-core.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-core.c
rename to drivers/media/test_drivers/vivid/vivid-core.c
diff --git a/drivers/media/platform/vivid/vivid-core.h b/drivers/media/test_drivers/vivid/vivid-core.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-core.h
rename to drivers/media/test_drivers/vivid/vivid-core.h
diff --git a/drivers/media/platform/vivid/vivid-ctrls.c b/drivers/media/test_drivers/vivid/vivid-ctrls.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-ctrls.c
rename to drivers/media/test_drivers/vivid/vivid-ctrls.c
diff --git a/drivers/media/platform/vivid/vivid-ctrls.h b/drivers/media/test_drivers/vivid/vivid-ctrls.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-ctrls.h
rename to drivers/media/test_drivers/vivid/vivid-ctrls.h
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/test_drivers/vivid/vivid-kthread-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-cap.c
rename to drivers/media/test_drivers/vivid/vivid-kthread-cap.c
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.h b/drivers/media/test_drivers/vivid/vivid-kthread-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-cap.h
rename to drivers/media/test_drivers/vivid/vivid-kthread-cap.h
diff --git a/drivers/media/platform/vivid/vivid-kthread-out.c b/drivers/media/test_drivers/vivid/vivid-kthread-out.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-out.c
rename to drivers/media/test_drivers/vivid/vivid-kthread-out.c
diff --git a/drivers/media/platform/vivid/vivid-kthread-out.h b/drivers/media/test_drivers/vivid/vivid-kthread-out.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-out.h
rename to drivers/media/test_drivers/vivid/vivid-kthread-out.h
diff --git a/drivers/media/platform/vivid/vivid-kthread-touch.c b/drivers/media/test_drivers/vivid/vivid-kthread-touch.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-touch.c
rename to drivers/media/test_drivers/vivid/vivid-kthread-touch.c
diff --git a/drivers/media/platform/vivid/vivid-kthread-touch.h b/drivers/media/test_drivers/vivid/vivid-kthread-touch.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-kthread-touch.h
rename to drivers/media/test_drivers/vivid/vivid-kthread-touch.h
diff --git a/drivers/media/platform/vivid/vivid-meta-cap.c b/drivers/media/test_drivers/vivid/vivid-meta-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-meta-cap.c
rename to drivers/media/test_drivers/vivid/vivid-meta-cap.c
diff --git a/drivers/media/platform/vivid/vivid-meta-cap.h b/drivers/media/test_drivers/vivid/vivid-meta-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-meta-cap.h
rename to drivers/media/test_drivers/vivid/vivid-meta-cap.h
diff --git a/drivers/media/platform/vivid/vivid-meta-out.c b/drivers/media/test_drivers/vivid/vivid-meta-out.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-meta-out.c
rename to drivers/media/test_drivers/vivid/vivid-meta-out.c
diff --git a/drivers/media/platform/vivid/vivid-meta-out.h b/drivers/media/test_drivers/vivid/vivid-meta-out.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-meta-out.h
rename to drivers/media/test_drivers/vivid/vivid-meta-out.h
diff --git a/drivers/media/platform/vivid/vivid-osd.c b/drivers/media/test_drivers/vivid/vivid-osd.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-osd.c
rename to drivers/media/test_drivers/vivid/vivid-osd.c
diff --git a/drivers/media/platform/vivid/vivid-osd.h b/drivers/media/test_drivers/vivid/vivid-osd.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-osd.h
rename to drivers/media/test_drivers/vivid/vivid-osd.h
diff --git a/drivers/media/platform/vivid/vivid-radio-common.c b/drivers/media/test_drivers/vivid/vivid-radio-common.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-common.c
rename to drivers/media/test_drivers/vivid/vivid-radio-common.c
diff --git a/drivers/media/platform/vivid/vivid-radio-common.h b/drivers/media/test_drivers/vivid/vivid-radio-common.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-common.h
rename to drivers/media/test_drivers/vivid/vivid-radio-common.h
diff --git a/drivers/media/platform/vivid/vivid-radio-rx.c b/drivers/media/test_drivers/vivid/vivid-radio-rx.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-rx.c
rename to drivers/media/test_drivers/vivid/vivid-radio-rx.c
diff --git a/drivers/media/platform/vivid/vivid-radio-rx.h b/drivers/media/test_drivers/vivid/vivid-radio-rx.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-rx.h
rename to drivers/media/test_drivers/vivid/vivid-radio-rx.h
diff --git a/drivers/media/platform/vivid/vivid-radio-tx.c b/drivers/media/test_drivers/vivid/vivid-radio-tx.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-tx.c
rename to drivers/media/test_drivers/vivid/vivid-radio-tx.c
diff --git a/drivers/media/platform/vivid/vivid-radio-tx.h b/drivers/media/test_drivers/vivid/vivid-radio-tx.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-radio-tx.h
rename to drivers/media/test_drivers/vivid/vivid-radio-tx.h
diff --git a/drivers/media/platform/vivid/vivid-rds-gen.c b/drivers/media/test_drivers/vivid/vivid-rds-gen.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-rds-gen.c
rename to drivers/media/test_drivers/vivid/vivid-rds-gen.c
diff --git a/drivers/media/platform/vivid/vivid-rds-gen.h b/drivers/media/test_drivers/vivid/vivid-rds-gen.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-rds-gen.h
rename to drivers/media/test_drivers/vivid/vivid-rds-gen.h
diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/test_drivers/vivid/vivid-sdr-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-sdr-cap.c
rename to drivers/media/test_drivers/vivid/vivid-sdr-cap.c
diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.h b/drivers/media/test_drivers/vivid/vivid-sdr-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-sdr-cap.h
rename to drivers/media/test_drivers/vivid/vivid-sdr-cap.h
diff --git a/drivers/media/platform/vivid/vivid-touch-cap.c b/drivers/media/test_drivers/vivid/vivid-touch-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-touch-cap.c
rename to drivers/media/test_drivers/vivid/vivid-touch-cap.c
diff --git a/drivers/media/platform/vivid/vivid-touch-cap.h b/drivers/media/test_drivers/vivid/vivid-touch-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-touch-cap.h
rename to drivers/media/test_drivers/vivid/vivid-touch-cap.h
diff --git a/drivers/media/platform/vivid/vivid-vbi-cap.c b/drivers/media/test_drivers/vivid/vivid-vbi-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-cap.c
rename to drivers/media/test_drivers/vivid/vivid-vbi-cap.c
diff --git a/drivers/media/platform/vivid/vivid-vbi-cap.h b/drivers/media/test_drivers/vivid/vivid-vbi-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-cap.h
rename to drivers/media/test_drivers/vivid/vivid-vbi-cap.h
diff --git a/drivers/media/platform/vivid/vivid-vbi-gen.c b/drivers/media/test_drivers/vivid/vivid-vbi-gen.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-gen.c
rename to drivers/media/test_drivers/vivid/vivid-vbi-gen.c
diff --git a/drivers/media/platform/vivid/vivid-vbi-gen.h b/drivers/media/test_drivers/vivid/vivid-vbi-gen.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-gen.h
rename to drivers/media/test_drivers/vivid/vivid-vbi-gen.h
diff --git a/drivers/media/platform/vivid/vivid-vbi-out.c b/drivers/media/test_drivers/vivid/vivid-vbi-out.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-out.c
rename to drivers/media/test_drivers/vivid/vivid-vbi-out.c
diff --git a/drivers/media/platform/vivid/vivid-vbi-out.h b/drivers/media/test_drivers/vivid/vivid-vbi-out.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vbi-out.h
rename to drivers/media/test_drivers/vivid/vivid-vbi-out.h
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/test_drivers/vivid/vivid-vid-cap.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-cap.c
rename to drivers/media/test_drivers/vivid/vivid-vid-cap.c
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.h b/drivers/media/test_drivers/vivid/vivid-vid-cap.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-cap.h
rename to drivers/media/test_drivers/vivid/vivid-vid-cap.h
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/test_drivers/vivid/vivid-vid-common.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-common.c
rename to drivers/media/test_drivers/vivid/vivid-vid-common.c
diff --git a/drivers/media/platform/vivid/vivid-vid-common.h b/drivers/media/test_drivers/vivid/vivid-vid-common.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-common.h
rename to drivers/media/test_drivers/vivid/vivid-vid-common.h
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/test_drivers/vivid/vivid-vid-out.c
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-out.c
rename to drivers/media/test_drivers/vivid/vivid-vid-out.c
diff --git a/drivers/media/platform/vivid/vivid-vid-out.h b/drivers/media/test_drivers/vivid/vivid-vid-out.h
similarity index 100%
rename from drivers/media/platform/vivid/vivid-vid-out.h
rename to drivers/media/test_drivers/vivid/vivid-vid-out.h
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 09/22] media: Kconfig: make filtering devices optional
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (7 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 08/22] media: split test drivers from platform directory Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 10/22] media: Kconfig: move CEC-specific options to cec/Kconfig Mauro Carvalho Chehab
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

The per-device option selection is a feature that some
developers love, while others hate...

So, let's make both happy by making it optional.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 0ab3f9946945..b059d5b29d22 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -25,14 +25,32 @@ menuconfig MEDIA_SUPPORT
 	  Additional info and docs are available on the web at
 	  <https://linuxtv.org>
 
-menu "Types of devices to be supported"
+if MEDIA_SUPPORT
+
+config MEDIA_SUPPORT_FILTER
+	bool "Filter devices by their types"
 	depends on MEDIA_SUPPORT
+	help
+	   Configuring the media subsystem can be complex, as there are
+	   hundreds of drivers and other config options.
+
+	   This menu offers option that will help the Kernel's config
+	   system to hide drivers that are out of the scope of the
+	   user needs, and disabling core support for unused APIs.
+
+	   If not selected, all non-optional media core functionality
+	   needed to support media drivers will be enabled. Also, all
+	   media device drivers should be shown.
+
+menu "Media device types"
+	visible if MEDIA_SUPPORT_FILTER
 
 #
 # Multimedia support - automatically enable V4L2 and DVB core
 #
 config MEDIA_CAMERA_SUPPORT
 	bool "Cameras and video grabbers"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable support for webcams and video grabbers.
 
@@ -40,6 +58,7 @@ config MEDIA_CAMERA_SUPPORT
 
 config MEDIA_ANALOG_TV_SUPPORT
 	bool "Analog TV"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable analog TV support.
 
@@ -52,6 +71,7 @@ config MEDIA_ANALOG_TV_SUPPORT
 
 config MEDIA_DIGITAL_TV_SUPPORT
 	bool "Digital TV"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable digital TV support.
 
@@ -60,6 +80,7 @@ config MEDIA_DIGITAL_TV_SUPPORT
 
 config MEDIA_RADIO_SUPPORT
 	bool "AM/FM radio receivers/transmitters"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable AM/FM radio support.
 
@@ -74,6 +95,7 @@ config MEDIA_RADIO_SUPPORT
 
 config MEDIA_SDR_SUPPORT
 	bool "Software defined radio"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable software defined radio support.
 
@@ -81,6 +103,7 @@ config MEDIA_SDR_SUPPORT
 
 config MEDIA_CEC_SUPPORT
 	bool "HDMI CEC support"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable support for HDMI CEC (Consumer Electronics Control),
 	  which is an optional HDMI feature.
@@ -90,6 +113,7 @@ config MEDIA_CEC_SUPPORT
 
 config MEDIA_PLATFORM_SUPPORT
 	bool "Platform-specific devices"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Enable support for complex cameras, codecs, and other hardware
 	  that are integrated at the CPU, GPU or on Image Signalling Processor
@@ -102,6 +126,7 @@ config MEDIA_PLATFORM_SUPPORT
 
 config MEDIA_TEST_SUPPORT
 	bool "Test drivers"
+	default y if !MEDIA_SUPPORT_FILTER
 	help
 	  Those drivers should not be used on production Kernels, but
 	  can be useful on debug ones. It enables several dummy drivers
@@ -110,10 +135,9 @@ config MEDIA_TEST_SUPPORT
 	  have regressions.
 
 	  Say Y when you have a software defined radio device.
+endmenu # media device types
 
-endmenu # media support types
-
-if MEDIA_SUPPORT
+comment "Media core options"
 
 source "drivers/media/cec/Kconfig"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 10/22] media: Kconfig: move CEC-specific options to cec/Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (8 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 09/22] media: Kconfig: make filtering devices optional Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 11/22] media: Kconfig: move comment to siano include Mauro Carvalho Chehab
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab, Hans Verkuil

There's no need to have the CEC definitions inside the
media Kconfig, as the Kconfig parser doesn't require
symbols to be declared before their usages.

With that, the main Kconfig menu becomes cleaner.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig     |  9 ---------
 drivers/media/cec/Kconfig | 10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index b059d5b29d22..cbf8073c43b4 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -3,15 +3,6 @@
 # Multimedia device configuration
 #
 
-config CEC_CORE
-	tristate
-
-config CEC_NOTIFIER
-	bool
-
-config CEC_PIN
-	bool
-
 source "drivers/media/rc/Kconfig"
 
 menuconfig MEDIA_SUPPORT
diff --git a/drivers/media/cec/Kconfig b/drivers/media/cec/Kconfig
index c01919713ab9..31417feaa213 100644
--- a/drivers/media/cec/Kconfig
+++ b/drivers/media/cec/Kconfig
@@ -1,4 +1,14 @@
 # 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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 11/22] media: Kconfig: move comment to siano include
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (9 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 10/22] media: Kconfig: move CEC-specific options to cec/Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 12/22] media: Kconfig: move DVB-specific options to dvb-core/Kconfig Mauro Carvalho Chehab
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

Showing this comment without showing the Siano mmc option
is very weird! Place the option together, and make it
visible only when showing Siano configuration.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/mmc/Kconfig       | 1 -
 drivers/media/mmc/siano/Kconfig | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/mmc/Kconfig b/drivers/media/mmc/Kconfig
index 5217f5bd205e..75aa6de08d53 100644
--- a/drivers/media/mmc/Kconfig
+++ b/drivers/media/mmc/Kconfig
@@ -1,3 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-comment "MMC/SDIO adapters"
 source "drivers/media/mmc/siano/Kconfig"
diff --git a/drivers/media/mmc/siano/Kconfig b/drivers/media/mmc/siano/Kconfig
index 1919f6fea8b1..570696019a9e 100644
--- a/drivers/media/mmc/siano/Kconfig
+++ b/drivers/media/mmc/siano/Kconfig
@@ -2,6 +2,8 @@
 #
 # Siano Mobile Silicon Digital TV device configuration
 #
+comment "MMC/SDIO DVB adapters"
+	depends on DVB_CORE && HAS_DMA && MMC
 
 config SMS_SDIO_DRV
 	tristate "Siano SMS1xxx based MDTV via SDIO interface"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 12/22] media: Kconfig: move DVB-specific options to dvb-core/Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (10 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 11/22] media: Kconfig: move comment to siano include Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 13/22] media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig Mauro Carvalho Chehab
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

In order to cleanup the main media Kconfig, move the DVB-core
specific options to dvb-core/Kconfig.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig          | 21 ---------------------
 drivers/media/dvb-core/Kconfig | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index cbf8073c43b4..a9fe9574a057 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -168,31 +168,10 @@ config DVB_CORE
 	default y
 	select CRC32
 
-config DVB_MMAP
-	bool "Enable DVB memory-mapped API (EXPERIMENTAL)"
-	depends on DVB_CORE
-	depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE
-	select VIDEOBUF2_VMALLOC
 	help
-	  This option enables DVB experimental memory-mapped API, which
-	  reduces the number of context switches to read DVB buffers, as
-	  the buffers can use mmap() syscalls.
 
-	  Support for it is experimental. Use with care. If unsure,
-	  say N.
 
-config DVB_NET
-	bool "DVB Network Support"
-	default (NET && INET)
-	depends on NET && INET && DVB_CORE
-	help
-	  This option enables DVB Network Support which is a part of the DVB
-	  standard. It is used, for example, by automatic firmware updates used
-	  on Set-Top-Boxes. It can also be used to access the Internet via the
-	  DVB card, if the network provider supports it.
 
-	  You may want to disable the network support on embedded devices. If
-	  unsure say Y.
 
 # This Kconfig option is used by both PCI and USB drivers
 config TTPCI_EEPROM
diff --git a/drivers/media/dvb-core/Kconfig b/drivers/media/dvb-core/Kconfig
index 90e038d5ffd9..0f8e53692b86 100644
--- a/drivers/media/dvb-core/Kconfig
+++ b/drivers/media/dvb-core/Kconfig
@@ -3,6 +3,32 @@
 # DVB device configuration
 #
 
+config DVB_MMAP
+	bool "Enable DVB memory-mapped API (EXPERIMENTAL)"
+	depends on DVB_CORE
+	depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE
+	select VIDEOBUF2_VMALLOC
+	help
+	  This option enables DVB experimental memory-mapped API, which
+	  reduces the number of context switches to read DVB buffers, as
+	  the buffers can use mmap() syscalls.
+
+	  Support for it is experimental. Use with care. If unsure,
+	  say N.
+
+config DVB_NET
+	bool "DVB Network Support"
+	default (NET && INET)
+	depends on NET && INET && DVB_CORE
+	help
+	  This option enables DVB Network Support which is a part of the DVB
+	  standard. It is used, for example, by automatic firmware updates used
+	  on Set-Top-Boxes. It can also be used to access the Internet via the
+	  DVB card, if the network provider supports it.
+
+	  You may want to disable the network support on embedded devices. If
+	  unsure say Y.
+
 config DVB_MAX_ADAPTERS
 	int "maximum number of DVB/ATSC adapters"
 	depends on DVB_CORE
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 13/22] media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (11 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 12/22] media: Kconfig: move DVB-specific options to dvb-core/Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 14/22] media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var Mauro Carvalho Chehab
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

This option is part of V4L2 API extra functionality set.
Move it to be at the v4l2-core/Kconfig, where it belongs,
cleaning the main Kconfig file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig           | 9 ---------
 drivers/media/v4l2-core/Kconfig | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index a9fe9574a057..b056976ebdee 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -144,15 +144,6 @@ config VIDEO_DEV
 	depends on MEDIA_SUPPORT
 	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
 
-config VIDEO_V4L2_SUBDEV_API
-	bool "V4L2 sub-device userspace API"
-	depends on VIDEO_DEV && MEDIA_CONTROLLER
-	help
-	  Enables the V4L2 sub-device pad-level userspace API used to configure
-	  video format, size and frame rate between hardware blocks.
-
-	  This API is mostly used by camera interfaces in embedded platforms.
-
 source "drivers/media/v4l2-core/Kconfig"
 
 #
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index 26276b257eae..33aa7fe571f8 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -16,6 +16,15 @@ config VIDEO_V4L2_I2C
 	depends on I2C && VIDEO_V4L2
 	default y
 
+config VIDEO_V4L2_SUBDEV_API
+	bool "V4L2 sub-device userspace API"
+	depends on VIDEO_DEV && MEDIA_CONTROLLER
+	help
+	  Enables the V4L2 sub-device pad-level userspace API used to configure
+	  video format, size and frame rate between hardware blocks.
+
+	  This API is mostly used by camera interfaces in embedded platforms.
+
 config VIDEO_ADV_DEBUG
 	bool "Enable advanced debug functionality on V4L2 drivers"
 	help
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 14/22] media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (12 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 13/22] media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig Mauro Carvalho Chehab
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

This option is used only by av7110 and by an USB driver. As
the av7110 is the first DVB hardware, hardly found those
days, let's opt to place it at usb/Kconfig, as the driver
with needs it might have a longer lifetime.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig     | 8 --------
 drivers/media/usb/Kconfig | 6 ++++++
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index b056976ebdee..d6766085c91b 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -161,14 +161,6 @@ config DVB_CORE
 
 	help
 
-
-
-
-# This Kconfig option is used by both PCI and USB drivers
-config TTPCI_EEPROM
-	tristate
-	depends on I2C
-
 source "drivers/media/dvb-core/Kconfig"
 
 comment "Media drivers"
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig
index e678d3d11467..bf08393e38d1 100644
--- a/drivers/media/usb/Kconfig
+++ b/drivers/media/usb/Kconfig
@@ -1,4 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# This Kconfig option is also used by the legacy av7110 driver
+config TTPCI_EEPROM
+	tristate
+	depends on I2C
+
 if USB && MEDIA_SUPPORT
 
 menuconfig MEDIA_USB_SUPPORT
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (13 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 14/22] media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25 10:00   ` Sakari Ailus
  2020-03-25  9:49 ` [PATCH v3 16/22] media: Kconfig: better organize menu items Mauro Carvalho Chehab
                   ` (6 subsequent siblings)
  21 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Laurent Pinchart

Let's place the main API selections at the media/Kconfig file,
as this way we can better organize things.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig    | 9 +++++++++
 drivers/media/mc/Kconfig | 9 ---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index d6766085c91b..3872e46545e6 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -144,6 +144,15 @@ config VIDEO_DEV
 	depends on MEDIA_SUPPORT
 	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
 
+config MEDIA_CONTROLLER
+	bool "Media Controller API"
+	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
+	help
+	  Enable the media controller API used to query media devices internal
+	  topology and configure it dynamically.
+
+	  This API is mostly used by camera interfaces in embedded platforms.
+
 source "drivers/media/v4l2-core/Kconfig"
 
 #
diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
index 3b9795cfcb36..b3579d6c9e32 100644
--- a/drivers/media/mc/Kconfig
+++ b/drivers/media/mc/Kconfig
@@ -3,15 +3,6 @@
 #	Selectable only for webcam/grabbers, as other drivers don't use it
 #
 
-config MEDIA_CONTROLLER
-	bool "Media Controller API"
-	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
-	help
-	  Enable the media controller API used to query media devices internal
-	  topology and configure it dynamically.
-
-	  This API is mostly used by camera interfaces in embedded platforms.
-
 config MEDIA_CONTROLLER_DVB
 	bool "Enable Media controller for DVB (EXPERIMENTAL)"
 	depends on MEDIA_CONTROLLER && DVB_CORE
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 16/22] media: Kconfig: better organize menu items
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (14 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig Mauro Carvalho Chehab
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

Place all API specific bits together

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 3872e46545e6..4fbebb6bda15 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -130,10 +130,6 @@ endmenu # media device types
 
 comment "Media core options"
 
-source "drivers/media/cec/Kconfig"
-
-source "drivers/media/mc/Kconfig"
-
 #
 # Video4Linux support
 #	Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
@@ -153,8 +149,6 @@ config MEDIA_CONTROLLER
 
 	  This API is mostly used by camera interfaces in embedded platforms.
 
-source "drivers/media/v4l2-core/Kconfig"
-
 #
 # DVB Core
 #	Only enables if one of DTV is selected
@@ -170,7 +164,10 @@ config DVB_CORE
 
 	help
 
+source "drivers/media/v4l2-core/Kconfig"
+source "drivers/media/mc/Kconfig"
 source "drivers/media/dvb-core/Kconfig"
+source "drivers/media/cec/Kconfig"
 
 comment "Media drivers"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (15 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 16/22] media: Kconfig: better organize menu items Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-26 12:09   ` Stefan Richter
  2020-03-25  9:49 ` [PATCH v3 18/22] media: Kconfig: place all options under a sub-menu Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  21 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Stefan Richter, linux1394-devel

This comment should only be visible if the DVB_FIREDTV
config will show.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig          | 2 --
 drivers/media/firewire/Kconfig | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 4fbebb6bda15..ad9636692183 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -185,8 +185,6 @@ source "drivers/media/mmc/Kconfig"
 endif
 
 
-comment "FireWire (IEEE 1394) Adapters"
-	depends on DVB_CORE && FIREWIRE
 source "drivers/media/firewire/Kconfig"
 
 comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
diff --git a/drivers/media/firewire/Kconfig b/drivers/media/firewire/Kconfig
index e7837da5905b..0c1f326f581f 100644
--- a/drivers/media/firewire/Kconfig
+++ b/drivers/media/firewire/Kconfig
@@ -1,7 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0-only
+if DVB_CORE && FIREWIRE
+comment "FireWire (IEEE 1394) Adapters"
+
 config DVB_FIREDTV
 	tristate "FireDTV and FloppyDTV"
-	depends on DVB_CORE && FIREWIRE
 	help
 	  Support for DVB receivers from Digital Everywhere
 	  which are connected via IEEE 1394 (FireWire).
@@ -18,3 +20,4 @@ config DVB_FIREDTV_INPUT
 	def_bool INPUT = y || (INPUT = m && DVB_FIREDTV = m)
 
 endif # DVB_FIREDTV
+endif # DVB_CORE && FIREWIRE
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 18/22] media: Kconfig: place all options under a sub-menu
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (16 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 19/22] media: Kconfig: move the position of sub-driver autoselection Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

That should make easier for people setting the media
subsystem config options, as they'll be split by the
type of functionality that will be enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 43 ++++++++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index ad9636692183..a8cda10b506c 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -128,48 +128,49 @@ config MEDIA_TEST_SUPPORT
 	  Say Y when you have a software defined radio device.
 endmenu # media device types
 
-comment "Media core options"
-
-#
-# Video4Linux support
-#	Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
-#
+menu "Media core support"
+	visible if !MEDIA_SUPPORT_FILTER
 
 config VIDEO_DEV
-	tristate
+	tristate "Video4Linux core"
 	depends on MEDIA_SUPPORT
 	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
+	help
+	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
+	  radio devices and by some input devices.
 
 config MEDIA_CONTROLLER
 	bool "Media Controller API"
-	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
+	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_EMBEDDED_SUPPORT
 	help
 	  Enable the media controller API used to query media devices internal
 	  topology and configure it dynamically.
 
 	  This API is mostly used by camera interfaces in embedded platforms.
 
-#
-# DVB Core
-#	Only enables if one of DTV is selected
-#
-
 config DVB_CORE
-	tristate
+	tristate "Digital TV core"
 	depends on MEDIA_SUPPORT
-	depends on MEDIA_DIGITAL_TV_SUPPORT
+	default MEDIA_DIGITAL_TV_SUPPORT
 	depends on (I2C || I2C=n)
-	default y
 	select CRC32
-
 	help
+	  Enables the DVB API, used by Digital TV devices. Supports several
+	  standards, including DVB, ATSC, ISDB and CMDB.
 
+endmenu # Media core support
+
+#
+# Extra per-media API core functionality
+
+menu "Media core additional options"
 source "drivers/media/v4l2-core/Kconfig"
 source "drivers/media/mc/Kconfig"
 source "drivers/media/dvb-core/Kconfig"
 source "drivers/media/cec/Kconfig"
+endmenu
 
-comment "Media drivers"
+menu "Media drivers"
 
 source "drivers/media/usb/Kconfig"
 source "drivers/media/pci/Kconfig"
@@ -187,7 +188,9 @@ endif
 
 source "drivers/media/firewire/Kconfig"
 
-comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
+endmenu
+
+menu "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
 
 #
 # Ancillary drivers (tuners, i2c, spi, frontends)
@@ -232,4 +235,6 @@ source "drivers/media/spi/Kconfig"
 source "drivers/media/tuners/Kconfig"
 source "drivers/media/dvb-frontends/Kconfig"
 
+endmenu
+
 endif # MEDIA_SUPPORT
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 19/22] media: Kconfig: move the position of sub-driver autoselection
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (17 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 18/22] media: Kconfig: place all options under a sub-menu Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 20/22] media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

Let's place the sub-driver-autoselection option just below
the device filtering one, as it also controls a filter menu,
with is not even visible if !EXPERT && !EMBEDDED.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 50 +++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index a8cda10b506c..efc46792e87f 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -33,6 +33,28 @@ config MEDIA_SUPPORT_FILTER
 	   needed to support media drivers will be enabled. Also, all
 	   media device drivers should be shown.
 
+config MEDIA_SUBDRV_AUTOSELECT
+	bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)"
+	depends on HAS_IOMEM
+	select I2C
+	select I2C_MUX
+	default y if MEDIA_SUPPORT_FILTER
+	help
+	  By default, a media driver auto-selects all possible ancillary
+	  devices such as tuners, sensors, video encoders/decoders and
+	  frontends, that are used by any of the supported devices.
+
+	  This is generally the right thing to do, except when there
+	  are strict constraints with regards to the kernel size,
+	  like on embedded systems.
+
+	  Use this option with care, as deselecting ancillary drivers which
+	  are, in fact, necessary will result in the lack of the needed
+	  functionality for your device (it may not tune or may not have
+	  the needed demodulators).
+
+	  If unsure say Y.
+
 menu "Media device types"
 	visible if MEDIA_SUPPORT_FILTER
 
@@ -190,40 +212,18 @@ source "drivers/media/firewire/Kconfig"
 
 endmenu
 
-menu "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
-
 #
 # Ancillary drivers (tuners, i2c, spi, frontends)
 #
 
-config MEDIA_SUBDRV_AUTOSELECT
-	bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)"
-	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT || MEDIA_SDR_SUPPORT
-	depends on HAS_IOMEM
-	select I2C
-	select I2C_MUX
-	default y if !EMBEDDED
-	help
-	  By default, a media driver auto-selects all possible ancillary
-	  devices such as tuners, sensors, video encoders/decoders and
-	  frontends, that are used by any of the supported devices.
-
-	  This is generally the right thing to do, except when there
-	  are strict constraints with regards to the kernel size,
-	  like on embedded systems.
-
-	  Use this option with care, as deselecting ancillary drivers which
-	  are, in fact, necessary will result in the lack of the needed
-	  functionality for your device (it may not tune or may not have
-	  the needed demodulators).
-
-	  If unsure say Y.
-
 config MEDIA_HIDE_ANCILLARY_SUBDRV
 	bool
 	depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT
 	default y
 
+menu "Media ancillary drivers"
+	visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
+
 config MEDIA_ATTACH
 	bool
 	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 20/22] media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (18 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 19/22] media: Kconfig: move the position of sub-driver autoselection Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 21/22] media: Kconfig: simplify some dependencies Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices Mauro Carvalho Chehab
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

Advanced and embedded users know what to do, so, by default,
they will likely want to be able to open the entire set of
Kconfig media options.

Normal "poor" users usually needs more help when setting
stuff, so let's open an more simplified version to them by
default.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index efc46792e87f..c900263438a7 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -21,6 +21,7 @@ if MEDIA_SUPPORT
 config MEDIA_SUPPORT_FILTER
 	bool "Filter devices by their types"
 	depends on MEDIA_SUPPORT
+	default y if !EMBEDDED && !EXPERT
 	help
 	   Configuring the media subsystem can be complex, as there are
 	   hundreds of drivers and other config options.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 21/22] media: Kconfig: simplify some dependencies
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (19 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 20/22] media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25  9:49 ` [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices Mauro Carvalho Chehab
  21 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

both DVB_CORE and VIDEO_DEV already depends on MEDIA_SUPPORT,
as they're below an if block.

So, remove this double dependency.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index c900263438a7..2a69b8024a0f 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -156,7 +156,6 @@ menu "Media core support"
 
 config VIDEO_DEV
 	tristate "Video4Linux core"
-	depends on MEDIA_SUPPORT
 	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
 	help
 	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
@@ -173,7 +172,6 @@ config MEDIA_CONTROLLER
 
 config DVB_CORE
 	tristate "Digital TV core"
-	depends on MEDIA_SUPPORT
 	default MEDIA_DIGITAL_TV_SUPPORT
 	depends on (I2C || I2C=n)
 	select CRC32
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices
  2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
                   ` (20 preceding siblings ...)
  2020-03-25  9:49 ` [PATCH v3 21/22] media: Kconfig: simplify some dependencies Mauro Carvalho Chehab
@ 2020-03-25  9:49 ` Mauro Carvalho Chehab
  2020-03-25 10:05   ` Mauro Carvalho Chehab
  21 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25  9:49 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab, Andy Walls, Mike Isely

Right now, if one has an hybrid TV card, it has to select
both analog and digital TV support, as otherwise the needed
core support won't be selected.

Change the logic to auto-select the core support for those
drivers, as this is a way more intuitive.

It should be noticed that, as now both DVB_CORE and VIDEO_DEV
defaults depends on selecting a hybrid cards, we had to remove
the explicit dependencies there, in order to avoid circular
dependencies. In order to get it right, we used a little trick,
to ensure that the core will be built as "y" if any driver
was built with "y".

Note: while here, moved two pure V4L2 PCI drivers out of the
"hybrid" part of config and consider pvrusb2 as an hybrid
device.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/Kconfig             | 18 ++++--------------
 drivers/media/pci/Kconfig         | 11 +++++++++--
 drivers/media/pci/bt8xx/Kconfig   |  5 ++---
 drivers/media/pci/cx18/Kconfig    |  2 +-
 drivers/media/pci/cx23885/Kconfig |  4 ++--
 drivers/media/pci/cx88/Kconfig    |  4 ++--
 drivers/media/pci/saa7134/Kconfig |  4 ++--
 drivers/media/pci/saa7164/Kconfig |  2 +-
 drivers/media/usb/Kconfig         |  8 +++++++-
 drivers/media/usb/au0828/Kconfig  |  6 ++----
 drivers/media/usb/cx231xx/Kconfig |  4 ++--
 drivers/media/usb/pvrusb2/Kconfig |  4 ++--
 drivers/media/usb/tm6000/Kconfig  |  4 ++--
 13 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 2a69b8024a0f..98695438c4af 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -76,12 +76,7 @@ config MEDIA_ANALOG_TV_SUPPORT
 	help
 	  Enable analog TV support.
 
-	  Say Y when you have a TV board with analog support or with a
-	  hybrid analog/digital TV chipset.
-
-	  Note: There are several DVB cards that are based on chips that
-		support both analog and digital TV. Disabling this option
-		will disable support for them.
+	  Say Y when you have a board with analog TV support.
 
 config MEDIA_DIGITAL_TV_SUPPORT
 	bool "Digital TV"
@@ -89,8 +84,7 @@ config MEDIA_DIGITAL_TV_SUPPORT
 	help
 	  Enable digital TV support.
 
-	  Say Y when you have a board with digital support or a board with
-	  hybrid digital TV and analog TV.
+	  Say Y when you have a board with digital TV support.
 
 config MEDIA_RADIO_SUPPORT
 	bool "AM/FM radio receivers/transmitters"
@@ -103,10 +97,6 @@ config MEDIA_RADIO_SUPPORT
 
 	  Say Y when you have a board with radio support.
 
-	  Note: There are several TV cards that are based on chips that
-		support radio reception. Disabling this option will
-		disable support for them.
-
 config MEDIA_SDR_SUPPORT
 	bool "Software defined radio"
 	default y if !MEDIA_SUPPORT_FILTER
@@ -156,7 +146,7 @@ menu "Media core support"
 
 config VIDEO_DEV
 	tristate "Video4Linux core"
-	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
+	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
 	help
 	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
 	  radio devices and by some input devices.
@@ -172,7 +162,7 @@ config MEDIA_CONTROLLER
 
 config DVB_CORE
 	tristate "Digital TV core"
-	default MEDIA_DIGITAL_TV_SUPPORT
+	default MEDIA_DIGITAL_TV_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
 	depends on (I2C || I2C=n)
 	select CRC32
 	help
diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index 9336f8446cf0..21ee43fd7d8e 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -1,4 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# Should match the hybrid card list below
+config MEDIA_HYBRID_PCI
+	bool
+	depends on VIDEO_CX18 || VIDEO_CX23885 || VIDEO_CX88 || VIDEO_BT848 || VIDEO_SAA7134 || VIDEO_SAA7164
+	default y
+
 if PCI && MEDIA_SUPPORT
 
 menuconfig MEDIA_PCI_SUPPORT
@@ -24,18 +31,18 @@ if MEDIA_ANALOG_TV_SUPPORT
 source "drivers/media/pci/ivtv/Kconfig"
 source "drivers/media/pci/saa7146/Kconfig"
 source "drivers/media/pci/dt3155/Kconfig"
+source "drivers/media/pci/cx25821/Kconfig"
+source "drivers/media/pci/cobalt/Kconfig"
 endif
 
 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
 	comment "Media capture/analog/hybrid TV support"
 source "drivers/media/pci/cx18/Kconfig"
 source "drivers/media/pci/cx23885/Kconfig"
-source "drivers/media/pci/cx25821/Kconfig"
 source "drivers/media/pci/cx88/Kconfig"
 source "drivers/media/pci/bt8xx/Kconfig"
 source "drivers/media/pci/saa7134/Kconfig"
 source "drivers/media/pci/saa7164/Kconfig"
-source "drivers/media/pci/cobalt/Kconfig"
 
 endif
 
diff --git a/drivers/media/pci/bt8xx/Kconfig b/drivers/media/pci/bt8xx/Kconfig
index 75d172a6f54c..c79c6175c262 100644
--- a/drivers/media/pci/bt8xx/Kconfig
+++ b/drivers/media/pci/bt8xx/Kconfig
@@ -1,11 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_BT848
 	tristate "BT848 Video For Linux"
-	depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select VIDEOBUF_DMA_SG
 	depends on RC_CORE
-	depends on MEDIA_RADIO_SUPPORT
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEO_MSP3400 if MEDIA_SUBDRV_AUTOSELECT
@@ -24,7 +23,7 @@ config VIDEO_BT848
 
 config DVB_BT8XX
 	tristate "DVB/ATSC Support for bt878 based TV cards"
-	depends on DVB_CORE && PCI && I2C && VIDEO_BT848
+	depends on PCI && I2C && VIDEO_BT848
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_SP887X if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_NXT6000 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/cx18/Kconfig b/drivers/media/pci/cx18/Kconfig
index 7074a1071302..110e072bd8ba 100644
--- a/drivers/media/pci/cx18/Kconfig
+++ b/drivers/media/pci/cx18/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX18
 	tristate "Conexant cx23418 MPEG encoder support"
-	depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select VIDEOBUF_VMALLOC
 	depends on RC_CORE
diff --git a/drivers/media/pci/cx23885/Kconfig b/drivers/media/pci/cx23885/Kconfig
index 926da881929d..e8f4edf270c8 100644
--- a/drivers/media/pci/cx23885/Kconfig
+++ b/drivers/media/pci/cx23885/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX23885
 	tristate "Conexant cx23885 (2388x successor) support"
-	depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && SND
+	depends on PCI && I2C && INPUT && SND
 	select SND_PCM
 	select I2C_ALGOBIT
 	select VIDEO_TUNER
@@ -53,7 +53,7 @@ config VIDEO_CX23885
 
 config MEDIA_ALTERA_CI
 	tristate "Altera FPGA based CI module"
-	depends on VIDEO_CX23885 && DVB_CORE
+	depends on VIDEO_CX23885
 	select ALTERA_STAPL
 	help
 	  An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.
diff --git a/drivers/media/pci/cx88/Kconfig b/drivers/media/pci/cx88/Kconfig
index 24e1e7c41744..ab994b3049f4 100644
--- a/drivers/media/pci/cx88/Kconfig
+++ b/drivers/media/pci/cx88/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX88
 	tristate "Conexant 2388x (bt878 successor) support"
-	depends on VIDEO_DEV && PCI && I2C && RC_CORE
+	depends on PCI && I2C && RC_CORE
 	select I2C_ALGOBIT
 	select VIDEOBUF2_DMA_SG
 	select VIDEO_TUNER
@@ -44,7 +44,7 @@ config VIDEO_CX88_BLACKBIRD
 
 config VIDEO_CX88_DVB
 	tristate "DVB/ATSC Support for cx2388x based TV cards"
-	depends on VIDEO_CX88 && DVB_CORE
+	depends on VIDEO_CX88
 	select VIDEOBUF2_DVB
 	select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/saa7134/Kconfig b/drivers/media/pci/saa7134/Kconfig
index 30c1759682a9..a2af02f6d593 100644
--- a/drivers/media/pci/saa7134/Kconfig
+++ b/drivers/media/pci/saa7134/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_SAA7134
 	tristate "Philips SAA7134 support"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on PCI && I2C
 	select VIDEOBUF2_DMA_SG
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
@@ -37,7 +37,7 @@ config VIDEO_SAA7134_RC
 
 config VIDEO_SAA7134_DVB
 	tristate "DVB/ATSC Support for saa7134 based TV cards"
-	depends on VIDEO_SAA7134 && DVB_CORE
+	depends on VIDEO_SAA7134
 	select VIDEOBUF2_DVB
 	select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/saa7164/Kconfig b/drivers/media/pci/saa7164/Kconfig
index 6655c3e504cd..8df933a722a7 100644
--- a/drivers/media/pci/saa7164/Kconfig
+++ b/drivers/media/pci/saa7164/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_SAA7164
 	tristate "NXP SAA7164 support"
-	depends on DVB_CORE && VIDEO_DEV && PCI && I2C
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select FW_LOADER
 	select VIDEO_TUNER
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig
index bf08393e38d1..036aa4385fdc 100644
--- a/drivers/media/usb/Kconfig
+++ b/drivers/media/usb/Kconfig
@@ -5,6 +5,12 @@ config TTPCI_EEPROM
 	tristate
 	depends on I2C
 
+# Should match the hybrid card list below
+config MEDIA_HYBRID_USB
+	bool
+	depends on VIDEO_AU0828 || VIDEO_CX231XX || VIDEO_TM6000 || VIDEO_PVRUSB2
+	default y
+
 if USB && MEDIA_SUPPORT
 
 menuconfig MEDIA_USB_SUPPORT
@@ -29,7 +35,6 @@ endif
 
 if MEDIA_ANALOG_TV_SUPPORT
 	comment "Analog TV USB devices"
-source "drivers/media/usb/pvrusb2/Kconfig"
 source "drivers/media/usb/hdpvr/Kconfig"
 source "drivers/media/usb/stk1160/Kconfig"
 source "drivers/media/usb/go7007/Kconfig"
@@ -39,6 +44,7 @@ if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT)
 	comment "Analog/digital TV USB devices"
 source "drivers/media/usb/au0828/Kconfig"
 source "drivers/media/usb/cx231xx/Kconfig"
+source "drivers/media/usb/pvrusb2/Kconfig"
 source "drivers/media/usb/tm6000/Kconfig"
 endif
 
diff --git a/drivers/media/usb/au0828/Kconfig b/drivers/media/usb/au0828/Kconfig
index 05cc6c48c26f..2f5ee684a278 100644
--- a/drivers/media/usb/au0828/Kconfig
+++ b/drivers/media/usb/au0828/Kconfig
@@ -2,12 +2,12 @@
 
 config VIDEO_AU0828
 	tristate "Auvitek AU0828 support"
-	depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2
+	depends on I2C && INPUT && USB
 	select MEDIA_CONTROLLER
 	select MEDIA_CONTROLLER_DVB
 	select I2C_ALGOBIT
 	select VIDEO_TVEEPROM
-	select VIDEOBUF2_VMALLOC if VIDEO_V4L2
+	select VIDEOBUF2_VMALLOC
 	select DVB_AU8522_DTV if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
@@ -22,8 +22,6 @@ config VIDEO_AU0828
 config VIDEO_AU0828_V4L2
 	bool "Auvitek AU0828 v4l2 analog video support"
 	depends on VIDEO_AU0828
-	depends on VIDEO_V4L2=y || VIDEO_V4L2=VIDEO_AU0828
-	select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT
 	select VIDEO_TUNER
 	default y
 	help
diff --git a/drivers/media/usb/cx231xx/Kconfig b/drivers/media/usb/cx231xx/Kconfig
index 2fe2b2d335ba..7e3b189f9dca 100644
--- a/drivers/media/usb/cx231xx/Kconfig
+++ b/drivers/media/usb/cx231xx/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX231XX
 	tristate "Conexant cx231xx USB video capture support"
-	depends on VIDEO_DEV && I2C && I2C_MUX
+	depends on I2C && I2C_MUX
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEOBUF2_VMALLOC
@@ -40,7 +40,7 @@ config VIDEO_CX231XX_ALSA
 
 config VIDEO_CX231XX_DVB
 	tristate "DVB/ATSC Support for Cx231xx based TV cards"
-	depends on VIDEO_CX231XX && DVB_CORE
+	depends on VIDEO_CX231XX
 	select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/usb/pvrusb2/Kconfig b/drivers/media/usb/pvrusb2/Kconfig
index e6a4f730591b..5bf45f2b2517 100644
--- a/drivers/media/usb/pvrusb2/Kconfig
+++ b/drivers/media/usb/pvrusb2/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_PVRUSB2
 	tristate "Hauppauge WinTV-PVR USB2 support"
-	depends on VIDEO_V4L2 && I2C
+	depends on I2C
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEO_CX2341X
@@ -36,7 +36,7 @@ config VIDEO_PVRUSB2_SYSFS
 config VIDEO_PVRUSB2_DVB
 	bool "pvrusb2 ATSC/DVB support"
 	default y
-	depends on VIDEO_PVRUSB2 && DVB_CORE
+	depends on VIDEO_PVRUSB2
 	select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/usb/tm6000/Kconfig b/drivers/media/usb/tm6000/Kconfig
index 56e977deba81..ad9cfa855eac 100644
--- a/drivers/media/usb/tm6000/Kconfig
+++ b/drivers/media/usb/tm6000/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_TM6000
 	tristate "TV Master TM5600/6000/6010 driver"
-	depends on VIDEO_DEV && I2C && INPUT && RC_CORE && USB
+	depends on I2C && INPUT && RC_CORE && USB
 	select VIDEO_TUNER
 	select MEDIA_TUNER_XC2028
 	select MEDIA_TUNER_XC5000
@@ -28,7 +28,7 @@ config VIDEO_TM6000_ALSA
 
 config VIDEO_TM6000_DVB
 	tristate "DVB Support for tm6000 based TV cards"
-	depends on VIDEO_TM6000 && DVB_CORE && USB
+	depends on VIDEO_TM6000 && USB
 	select DVB_ZL10353
 	help
 	  This adds support for DVB cards based on the tm5600/tm6000 chip.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
  2020-03-25  9:49 ` [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig Mauro Carvalho Chehab
@ 2020-03-25 10:00   ` Sakari Ailus
  2020-03-25 10:08     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 30+ messages in thread
From: Sakari Ailus @ 2020-03-25 10:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Laurent Pinchart

Hi Mauro,

On Wed, Mar 25, 2020 at 10:49:29AM +0100, Mauro Carvalho Chehab wrote:
> Let's place the main API selections at the media/Kconfig file,
> as this way we can better organize things.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  drivers/media/Kconfig    | 9 +++++++++
>  drivers/media/mc/Kconfig | 9 ---------
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index d6766085c91b..3872e46545e6 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -144,6 +144,15 @@ config VIDEO_DEV
>  	depends on MEDIA_SUPPORT
>  	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
>  
> +config MEDIA_CONTROLLER
> +	bool "Media Controller API"
> +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> +	help
> +	  Enable the media controller API used to query media devices internal
> +	  topology and configure it dynamically.
> +
> +	  This API is mostly used by camera interfaces in embedded platforms.
> +
>  source "drivers/media/v4l2-core/Kconfig"
>  
>  #
> diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
> index 3b9795cfcb36..b3579d6c9e32 100644
> --- a/drivers/media/mc/Kconfig
> +++ b/drivers/media/mc/Kconfig
> @@ -3,15 +3,6 @@
>  #	Selectable only for webcam/grabbers, as other drivers don't use it
>  #
>  
> -config MEDIA_CONTROLLER
> -	bool "Media Controller API"
> -	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> -	help
> -	  Enable the media controller API used to query media devices internal
> -	  topology and configure it dynamically.
> -
> -	  This API is mostly used by camera interfaces in embedded platforms.
> -
>  config MEDIA_CONTROLLER_DVB
>  	bool "Enable Media controller for DVB (EXPERIMENTAL)"
>  	depends on MEDIA_CONTROLLER && DVB_CORE

This moves the main MC configuration out of the directory but leaves the
rest of the MC configuration under the mc directory. All MC related
configuration is currently in a single place, which makes sense.

I guess you can always have arguments for and against, but my preference is
keeping it as-is.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices
  2020-03-25  9:49 ` [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices Mauro Carvalho Chehab
@ 2020-03-25 10:05   ` Mauro Carvalho Chehab
  2020-03-25 11:25     ` [PATCH v3.1 " Mauro Carvalho Chehab
  0 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25 10:05 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Andy Walls, Mike Isely

Em Wed, 25 Mar 2020 10:49:36 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Right now, if one has an hybrid TV card, it has to select
> both analog and digital TV support, as otherwise the needed
> core support won't be selected.
> 
> Change the logic to auto-select the core support for those
> drivers, as this is a way more intuitive.
> 
> It should be noticed that, as now both DVB_CORE and VIDEO_DEV
> defaults depends on selecting a hybrid cards, we had to remove
> the explicit dependencies there, in order to avoid circular
> dependencies. In order to get it right, we used a little trick,
> to ensure that the core will be built as "y" if any driver
> was built with "y".
> 
> Note: while here, moved two pure V4L2 PCI drivers out of the
> "hybrid" part of config and consider pvrusb2 as an hybrid
> device.

Found some issues on this patch. Please ignore it.

I'm trying to see if are there any other way of doing that
without incurring into circular dependencies nor allowing
errors at build time or warnings at make menuconfig time.

I remember I tried to do something like that in the past,
but the dependency chain is too complex.

Suggestions are welcomed.

Regards,
Mauro

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
  2020-03-25 10:00   ` Sakari Ailus
@ 2020-03-25 10:08     ` Mauro Carvalho Chehab
  2020-03-25 10:21       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25 10:08 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Linux Media Mailing List, Laurent Pinchart

Em Wed, 25 Mar 2020 12:00:59 +0200
Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:

> Hi Mauro,
> 
> On Wed, Mar 25, 2020 at 10:49:29AM +0100, Mauro Carvalho Chehab wrote:
> > Let's place the main API selections at the media/Kconfig file,
> > as this way we can better organize things.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> >  drivers/media/Kconfig    | 9 +++++++++
> >  drivers/media/mc/Kconfig | 9 ---------
> >  2 files changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > index d6766085c91b..3872e46545e6 100644
> > --- a/drivers/media/Kconfig
> > +++ b/drivers/media/Kconfig
> > @@ -144,6 +144,15 @@ config VIDEO_DEV
> >  	depends on MEDIA_SUPPORT
> >  	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
> >  
> > +config MEDIA_CONTROLLER
> > +	bool "Media Controller API"
> > +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > +	help
> > +	  Enable the media controller API used to query media devices internal
> > +	  topology and configure it dynamically.
> > +
> > +	  This API is mostly used by camera interfaces in embedded platforms.
> > +
> >  source "drivers/media/v4l2-core/Kconfig"
> >  
> >  #
> > diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
> > index 3b9795cfcb36..b3579d6c9e32 100644
> > --- a/drivers/media/mc/Kconfig
> > +++ b/drivers/media/mc/Kconfig
> > @@ -3,15 +3,6 @@
> >  #	Selectable only for webcam/grabbers, as other drivers don't use it
> >  #
> >  
> > -config MEDIA_CONTROLLER
> > -	bool "Media Controller API"
> > -	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > -	help
> > -	  Enable the media controller API used to query media devices internal
> > -	  topology and configure it dynamically.
> > -
> > -	  This API is mostly used by camera interfaces in embedded platforms.
> > -
> >  config MEDIA_CONTROLLER_DVB
> >  	bool "Enable Media controller for DVB (EXPERIMENTAL)"
> >  	depends on MEDIA_CONTROLLER && DVB_CORE  
> 
> This moves the main MC configuration out of the directory but leaves the
> rest of the MC configuration under the mc directory. All MC related
> configuration is currently in a single place, which makes sense.
> 
> I guess you can always have arguments for and against, but my preference is
> keeping it as-is.

Well, the advantage (after applying the entire series), is that it can now
present two separate menus:

the first one with the core stuff (MC, V4L and DVB), and a second one
with the extra features for those three.

Btw, it just occurred to me that perhaps we could map it on a different way,
using a menu for MC, another one for V4L and a third one for DVB.

In any case, in order to do that, we need to have the "extra" features
on a separate file than the main ones.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
  2020-03-25 10:08     ` Mauro Carvalho Chehab
@ 2020-03-25 10:21       ` Mauro Carvalho Chehab
  2020-03-30  7:46         ` Sakari Ailus
  0 siblings, 1 reply; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25 10:21 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Linux Media Mailing List, Laurent Pinchart

Em Wed, 25 Mar 2020 11:08:34 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Em Wed, 25 Mar 2020 12:00:59 +0200
> Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> 
> > Hi Mauro,
> > 
> > On Wed, Mar 25, 2020 at 10:49:29AM +0100, Mauro Carvalho Chehab wrote:
> > > Let's place the main API selections at the media/Kconfig file,
> > > as this way we can better organize things.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > > ---
> > >  drivers/media/Kconfig    | 9 +++++++++
> > >  drivers/media/mc/Kconfig | 9 ---------
> > >  2 files changed, 9 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > > index d6766085c91b..3872e46545e6 100644
> > > --- a/drivers/media/Kconfig
> > > +++ b/drivers/media/Kconfig
> > > @@ -144,6 +144,15 @@ config VIDEO_DEV
> > >  	depends on MEDIA_SUPPORT
> > >  	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
> > >  
> > > +config MEDIA_CONTROLLER
> > > +	bool "Media Controller API"
> > > +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > > +	help
> > > +	  Enable the media controller API used to query media devices internal
> > > +	  topology and configure it dynamically.
> > > +
> > > +	  This API is mostly used by camera interfaces in embedded platforms.
> > > +
> > >  source "drivers/media/v4l2-core/Kconfig"
> > >  
> > >  #
> > > diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
> > > index 3b9795cfcb36..b3579d6c9e32 100644
> > > --- a/drivers/media/mc/Kconfig
> > > +++ b/drivers/media/mc/Kconfig
> > > @@ -3,15 +3,6 @@
> > >  #	Selectable only for webcam/grabbers, as other drivers don't use it
> > >  #
> > >  
> > > -config MEDIA_CONTROLLER
> > > -	bool "Media Controller API"
> > > -	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > > -	help
> > > -	  Enable the media controller API used to query media devices internal
> > > -	  topology and configure it dynamically.
> > > -
> > > -	  This API is mostly used by camera interfaces in embedded platforms.
> > > -
> > >  config MEDIA_CONTROLLER_DVB
> > >  	bool "Enable Media controller for DVB (EXPERIMENTAL)"
> > >  	depends on MEDIA_CONTROLLER && DVB_CORE  
> > 
> > This moves the main MC configuration out of the directory but leaves the
> > rest of the MC configuration under the mc directory. All MC related
> > configuration is currently in a single place, which makes sense.
> > 
> > I guess you can always have arguments for and against, but my preference is
> > keeping it as-is.
> 
> Well, the advantage (after applying the entire series), is that it can now
> present two separate menus:
> 
> the first one with the core stuff (MC, V4L and DVB), and a second one
> with the extra features for those three.
> 
> Btw, it just occurred to me that perhaps we could map it on a different way,
> using a menu for MC, another one for V4L and a third one for DVB.

What occurred to me is shown at the patch below (applied after this patch
series).

IMHO, it is a way better to present things like that.

Thanks,
Mauro

[PATCH] media: Kconfig: Better organize the per-API options

After this change, the menu is displayed like above.

1) When filtering is not active:

    --- Multimedia support
        [ ]   Filter devices by their types
        [*]   Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)
              Media core support  --->
              Video4Linux options  --->
              Media controller options  --->
              Digital TV options  --->
              HDMI CEC options  --->
              Media drivers  --->

2) When filtering is active:

    --- Multimedia support
        [*]   Filter devices by their types
        [*]   Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)
              Media device types  --->
              Video4Linux options  --->
              Media controller options  --->
              Digital TV options  --->
              HDMI CEC options  --->
              Media drivers  --->

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 2a69b8024a0f..f942d19cf99b 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -184,10 +184,19 @@ endmenu # Media core support
 #
 # Extra per-media API core functionality
 
-menu "Media core additional options"
+menu "Video4Linux options"
 source "drivers/media/v4l2-core/Kconfig"
+endmenu
+
+menu "Media controller options"
 source "drivers/media/mc/Kconfig"
+endmenu
+
+menu "Digital TV options"
 source "drivers/media/dvb-core/Kconfig"
+endmenu
+
+menu "HDMI CEC options"
 source "drivers/media/cec/Kconfig"
 endmenu
 




^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v3.1 22/22] media: Kconfig: better support hybrid TV devices
  2020-03-25 10:05   ` Mauro Carvalho Chehab
@ 2020-03-25 11:25     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 30+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-25 11:25 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab, Andy Walls, Mike Isely

Right now, if one has an hybrid TV card, it has to select
both analog and digital TV support, as otherwise the needed
core support won't be selected.

Change the logic to auto-select the core support for those
drivers, as this is a way more intuitive.

It should be noticed that, as now both DVB_CORE and VIDEO_DEV
defaults depends on selecting a hybrid cards, we had to remove
the explicit dependencies there, in order to avoid circular
dependencies.

That requires some tricks:

1) the prompt should not be not visible when an hybrid card
   is selected, as the user shold not change it.

2) When a media hybrid device is selected, the modular
   option for DVB_CORE and VIDEO_DEV will follow the
   MEDIA_SUPPORT dependency, as we can't have a core
   built with "y" with a driver built as module.

Note: while here, moved two pure V4L2 PCI drivers out of the
"hybrid" part of config and consider pvrusb2 as an hybrid
device.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

The original version of this patch had an issue: hybrid support would
do the wrong thing when filter option is turned off, as it would be possible
for an user to first select an hybrid card and then disable either V4L2 or
DVB support.

So, this version makes the prompt invisible, replacing it by a comment,
when an hybrid TV card is selected.


 drivers/media/Kconfig             | 30 ++++++++++++++----------------
 drivers/media/pci/Kconfig         | 11 +++++++++--
 drivers/media/pci/bt8xx/Kconfig   |  5 ++---
 drivers/media/pci/cx18/Kconfig    |  2 +-
 drivers/media/pci/cx23885/Kconfig |  4 ++--
 drivers/media/pci/cx88/Kconfig    |  4 ++--
 drivers/media/pci/saa7134/Kconfig |  4 ++--
 drivers/media/pci/saa7164/Kconfig |  2 +-
 drivers/media/usb/Kconfig         |  8 +++++++-
 drivers/media/usb/au0828/Kconfig  |  6 ++----
 drivers/media/usb/cx231xx/Kconfig |  4 ++--
 drivers/media/usb/pvrusb2/Kconfig |  4 ++--
 drivers/media/usb/tm6000/Kconfig  |  4 ++--
 13 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 1bfe61a75fc2..787a8b8f288a 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -76,12 +76,7 @@ config MEDIA_ANALOG_TV_SUPPORT
 	help
 	  Enable analog TV support.
 
-	  Say Y when you have a TV board with analog support or with a
-	  hybrid analog/digital TV chipset.
-
-	  Note: There are several DVB cards that are based on chips that
-		support both analog and digital TV. Disabling this option
-		will disable support for them.
+	  Say Y when you have a board with analog TV support.
 
 config MEDIA_DIGITAL_TV_SUPPORT
 	bool "Digital TV"
@@ -89,8 +84,7 @@ config MEDIA_DIGITAL_TV_SUPPORT
 	help
 	  Enable digital TV support.
 
-	  Say Y when you have a board with digital support or a board with
-	  hybrid digital TV and analog TV.
+	  Say Y when you have a board with digital TV support.
 
 config MEDIA_RADIO_SUPPORT
 	bool "AM/FM radio receivers/transmitters"
@@ -103,10 +97,6 @@ config MEDIA_RADIO_SUPPORT
 
 	  Say Y when you have a board with radio support.
 
-	  Note: There are several TV cards that are based on chips that
-		support radio reception. Disabling this option will
-		disable support for them.
-
 config MEDIA_SDR_SUPPORT
 	bool "Software defined radio"
 	default y if !MEDIA_SUPPORT_FILTER
@@ -154,9 +144,13 @@ endmenu # media device types
 menu "Media core support"
 	visible if !MEDIA_SUPPORT_FILTER
 
+comment "Video4Linux core enabled to support hybrid TV devices"
+	depends on MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
+
 config VIDEO_DEV
-	tristate "Video4Linux core"
-	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
+	tristate
+	prompt "Video4Linux core" if !(MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI)
+	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
 	help
 	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
 	  radio devices and by some input devices.
@@ -170,9 +164,13 @@ config MEDIA_CONTROLLER
 
 	  This API is mostly used by camera interfaces in embedded platforms.
 
+comment "Digital TV core enabled to support hybrid TV devices"
+	depends on MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
+
 config DVB_CORE
-	tristate "Digital TV core"
-	default MEDIA_DIGITAL_TV_SUPPORT
+	tristate
+	prompt "Digital TV core"  if !(MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI)
+	default MEDIA_DIGITAL_TV_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI
 	depends on (I2C || I2C=n)
 	select CRC32
 	help
diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig
index 9336f8446cf0..21ee43fd7d8e 100644
--- a/drivers/media/pci/Kconfig
+++ b/drivers/media/pci/Kconfig
@@ -1,4 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+# Should match the hybrid card list below
+config MEDIA_HYBRID_PCI
+	bool
+	depends on VIDEO_CX18 || VIDEO_CX23885 || VIDEO_CX88 || VIDEO_BT848 || VIDEO_SAA7134 || VIDEO_SAA7164
+	default y
+
 if PCI && MEDIA_SUPPORT
 
 menuconfig MEDIA_PCI_SUPPORT
@@ -24,18 +31,18 @@ if MEDIA_ANALOG_TV_SUPPORT
 source "drivers/media/pci/ivtv/Kconfig"
 source "drivers/media/pci/saa7146/Kconfig"
 source "drivers/media/pci/dt3155/Kconfig"
+source "drivers/media/pci/cx25821/Kconfig"
+source "drivers/media/pci/cobalt/Kconfig"
 endif
 
 if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
 	comment "Media capture/analog/hybrid TV support"
 source "drivers/media/pci/cx18/Kconfig"
 source "drivers/media/pci/cx23885/Kconfig"
-source "drivers/media/pci/cx25821/Kconfig"
 source "drivers/media/pci/cx88/Kconfig"
 source "drivers/media/pci/bt8xx/Kconfig"
 source "drivers/media/pci/saa7134/Kconfig"
 source "drivers/media/pci/saa7164/Kconfig"
-source "drivers/media/pci/cobalt/Kconfig"
 
 endif
 
diff --git a/drivers/media/pci/bt8xx/Kconfig b/drivers/media/pci/bt8xx/Kconfig
index 75d172a6f54c..c79c6175c262 100644
--- a/drivers/media/pci/bt8xx/Kconfig
+++ b/drivers/media/pci/bt8xx/Kconfig
@@ -1,11 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_BT848
 	tristate "BT848 Video For Linux"
-	depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select VIDEOBUF_DMA_SG
 	depends on RC_CORE
-	depends on MEDIA_RADIO_SUPPORT
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEO_MSP3400 if MEDIA_SUBDRV_AUTOSELECT
@@ -24,7 +23,7 @@ config VIDEO_BT848
 
 config DVB_BT8XX
 	tristate "DVB/ATSC Support for bt878 based TV cards"
-	depends on DVB_CORE && PCI && I2C && VIDEO_BT848
+	depends on PCI && I2C && VIDEO_BT848
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_SP887X if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_NXT6000 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/cx18/Kconfig b/drivers/media/pci/cx18/Kconfig
index 7074a1071302..110e072bd8ba 100644
--- a/drivers/media/pci/cx18/Kconfig
+++ b/drivers/media/pci/cx18/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX18
 	tristate "Conexant cx23418 MPEG encoder support"
-	depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select VIDEOBUF_VMALLOC
 	depends on RC_CORE
diff --git a/drivers/media/pci/cx23885/Kconfig b/drivers/media/pci/cx23885/Kconfig
index 926da881929d..e8f4edf270c8 100644
--- a/drivers/media/pci/cx23885/Kconfig
+++ b/drivers/media/pci/cx23885/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX23885
 	tristate "Conexant cx23885 (2388x successor) support"
-	depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && SND
+	depends on PCI && I2C && INPUT && SND
 	select SND_PCM
 	select I2C_ALGOBIT
 	select VIDEO_TUNER
@@ -53,7 +53,7 @@ config VIDEO_CX23885
 
 config MEDIA_ALTERA_CI
 	tristate "Altera FPGA based CI module"
-	depends on VIDEO_CX23885 && DVB_CORE
+	depends on VIDEO_CX23885
 	select ALTERA_STAPL
 	help
 	  An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.
diff --git a/drivers/media/pci/cx88/Kconfig b/drivers/media/pci/cx88/Kconfig
index 24e1e7c41744..ab994b3049f4 100644
--- a/drivers/media/pci/cx88/Kconfig
+++ b/drivers/media/pci/cx88/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX88
 	tristate "Conexant 2388x (bt878 successor) support"
-	depends on VIDEO_DEV && PCI && I2C && RC_CORE
+	depends on PCI && I2C && RC_CORE
 	select I2C_ALGOBIT
 	select VIDEOBUF2_DMA_SG
 	select VIDEO_TUNER
@@ -44,7 +44,7 @@ config VIDEO_CX88_BLACKBIRD
 
 config VIDEO_CX88_DVB
 	tristate "DVB/ATSC Support for cx2388x based TV cards"
-	depends on VIDEO_CX88 && DVB_CORE
+	depends on VIDEO_CX88
 	select VIDEOBUF2_DVB
 	select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/saa7134/Kconfig b/drivers/media/pci/saa7134/Kconfig
index 30c1759682a9..a2af02f6d593 100644
--- a/drivers/media/pci/saa7134/Kconfig
+++ b/drivers/media/pci/saa7134/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_SAA7134
 	tristate "Philips SAA7134 support"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on PCI && I2C
 	select VIDEOBUF2_DMA_SG
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
@@ -37,7 +37,7 @@ config VIDEO_SAA7134_RC
 
 config VIDEO_SAA7134_DVB
 	tristate "DVB/ATSC Support for saa7134 based TV cards"
-	depends on VIDEO_SAA7134 && DVB_CORE
+	depends on VIDEO_SAA7134
 	select VIDEOBUF2_DVB
 	select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/pci/saa7164/Kconfig b/drivers/media/pci/saa7164/Kconfig
index 6655c3e504cd..8df933a722a7 100644
--- a/drivers/media/pci/saa7164/Kconfig
+++ b/drivers/media/pci/saa7164/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_SAA7164
 	tristate "NXP SAA7164 support"
-	depends on DVB_CORE && VIDEO_DEV && PCI && I2C
+	depends on PCI && I2C
 	select I2C_ALGOBIT
 	select FW_LOADER
 	select VIDEO_TUNER
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig
index bf08393e38d1..036aa4385fdc 100644
--- a/drivers/media/usb/Kconfig
+++ b/drivers/media/usb/Kconfig
@@ -5,6 +5,12 @@ config TTPCI_EEPROM
 	tristate
 	depends on I2C
 
+# Should match the hybrid card list below
+config MEDIA_HYBRID_USB
+	bool
+	depends on VIDEO_AU0828 || VIDEO_CX231XX || VIDEO_TM6000 || VIDEO_PVRUSB2
+	default y
+
 if USB && MEDIA_SUPPORT
 
 menuconfig MEDIA_USB_SUPPORT
@@ -29,7 +35,6 @@ endif
 
 if MEDIA_ANALOG_TV_SUPPORT
 	comment "Analog TV USB devices"
-source "drivers/media/usb/pvrusb2/Kconfig"
 source "drivers/media/usb/hdpvr/Kconfig"
 source "drivers/media/usb/stk1160/Kconfig"
 source "drivers/media/usb/go7007/Kconfig"
@@ -39,6 +44,7 @@ if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT)
 	comment "Analog/digital TV USB devices"
 source "drivers/media/usb/au0828/Kconfig"
 source "drivers/media/usb/cx231xx/Kconfig"
+source "drivers/media/usb/pvrusb2/Kconfig"
 source "drivers/media/usb/tm6000/Kconfig"
 endif
 
diff --git a/drivers/media/usb/au0828/Kconfig b/drivers/media/usb/au0828/Kconfig
index 05cc6c48c26f..2f5ee684a278 100644
--- a/drivers/media/usb/au0828/Kconfig
+++ b/drivers/media/usb/au0828/Kconfig
@@ -2,12 +2,12 @@
 
 config VIDEO_AU0828
 	tristate "Auvitek AU0828 support"
-	depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2
+	depends on I2C && INPUT && USB
 	select MEDIA_CONTROLLER
 	select MEDIA_CONTROLLER_DVB
 	select I2C_ALGOBIT
 	select VIDEO_TVEEPROM
-	select VIDEOBUF2_VMALLOC if VIDEO_V4L2
+	select VIDEOBUF2_VMALLOC
 	select DVB_AU8522_DTV if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
@@ -22,8 +22,6 @@ config VIDEO_AU0828
 config VIDEO_AU0828_V4L2
 	bool "Auvitek AU0828 v4l2 analog video support"
 	depends on VIDEO_AU0828
-	depends on VIDEO_V4L2=y || VIDEO_V4L2=VIDEO_AU0828
-	select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT
 	select VIDEO_TUNER
 	default y
 	help
diff --git a/drivers/media/usb/cx231xx/Kconfig b/drivers/media/usb/cx231xx/Kconfig
index 2fe2b2d335ba..7e3b189f9dca 100644
--- a/drivers/media/usb/cx231xx/Kconfig
+++ b/drivers/media/usb/cx231xx/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_CX231XX
 	tristate "Conexant cx231xx USB video capture support"
-	depends on VIDEO_DEV && I2C && I2C_MUX
+	depends on I2C && I2C_MUX
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEOBUF2_VMALLOC
@@ -40,7 +40,7 @@ config VIDEO_CX231XX_ALSA
 
 config VIDEO_CX231XX_DVB
 	tristate "DVB/ATSC Support for Cx231xx based TV cards"
-	depends on VIDEO_CX231XX && DVB_CORE
+	depends on VIDEO_CX231XX
 	select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
 	select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/usb/pvrusb2/Kconfig b/drivers/media/usb/pvrusb2/Kconfig
index e6a4f730591b..5bf45f2b2517 100644
--- a/drivers/media/usb/pvrusb2/Kconfig
+++ b/drivers/media/usb/pvrusb2/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_PVRUSB2
 	tristate "Hauppauge WinTV-PVR USB2 support"
-	depends on VIDEO_V4L2 && I2C
+	depends on I2C
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEO_CX2341X
@@ -36,7 +36,7 @@ config VIDEO_PVRUSB2_SYSFS
 config VIDEO_PVRUSB2_DVB
 	bool "pvrusb2 ATSC/DVB support"
 	default y
-	depends on VIDEO_PVRUSB2 && DVB_CORE
+	depends on VIDEO_PVRUSB2
 	select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
diff --git a/drivers/media/usb/tm6000/Kconfig b/drivers/media/usb/tm6000/Kconfig
index 56e977deba81..ad9cfa855eac 100644
--- a/drivers/media/usb/tm6000/Kconfig
+++ b/drivers/media/usb/tm6000/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config VIDEO_TM6000
 	tristate "TV Master TM5600/6000/6010 driver"
-	depends on VIDEO_DEV && I2C && INPUT && RC_CORE && USB
+	depends on I2C && INPUT && RC_CORE && USB
 	select VIDEO_TUNER
 	select MEDIA_TUNER_XC2028
 	select MEDIA_TUNER_XC5000
@@ -28,7 +28,7 @@ config VIDEO_TM6000_ALSA
 
 config VIDEO_TM6000_DVB
 	tristate "DVB Support for tm6000 based TV cards"
-	depends on VIDEO_TM6000 && DVB_CORE && USB
+	depends on VIDEO_TM6000 && USB
 	select DVB_ZL10353
 	help
 	  This adds support for DVB cards based on the tm5600/tm6000 chip.
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig
  2020-03-25  9:49 ` [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig Mauro Carvalho Chehab
@ 2020-03-26 12:09   ` Stefan Richter
  0 siblings, 0 replies; 30+ messages in thread
From: Stefan Richter @ 2020-03-26 12:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, linux1394-devel

On Mar 25 Mauro Carvalho Chehab wrote:
> This comment should only be visible if the DVB_FIREDTV
> config will show.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

> ---
>  drivers/media/Kconfig          | 2 --
>  drivers/media/firewire/Kconfig | 5 ++++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index 4fbebb6bda15..ad9636692183 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -185,8 +185,6 @@ source "drivers/media/mmc/Kconfig"
>  endif
>  
>  
> -comment "FireWire (IEEE 1394) Adapters"
> -	depends on DVB_CORE && FIREWIRE
>  source "drivers/media/firewire/Kconfig"
>  
>  comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
> diff --git a/drivers/media/firewire/Kconfig b/drivers/media/firewire/Kconfig
> index e7837da5905b..0c1f326f581f 100644
> --- a/drivers/media/firewire/Kconfig
> +++ b/drivers/media/firewire/Kconfig
> @@ -1,7 +1,9 @@
>  # SPDX-License-Identifier: GPL-2.0-only
> +if DVB_CORE && FIREWIRE
> +comment "FireWire (IEEE 1394) Adapters"
> +
>  config DVB_FIREDTV
>  	tristate "FireDTV and FloppyDTV"
> -	depends on DVB_CORE && FIREWIRE
>  	help
>  	  Support for DVB receivers from Digital Everywhere
>  	  which are connected via IEEE 1394 (FireWire).
> @@ -18,3 +20,4 @@ config DVB_FIREDTV_INPUT
>  	def_bool INPUT = y || (INPUT = m && DVB_FIREDTV = m)
>  
>  endif # DVB_FIREDTV
> +endif # DVB_CORE && FIREWIRE



-- 
Stefan Richter
-======--=-- --== ==-=-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
  2020-03-25 10:21       ` Mauro Carvalho Chehab
@ 2020-03-30  7:46         ` Sakari Ailus
  0 siblings, 0 replies; 30+ messages in thread
From: Sakari Ailus @ 2020-03-30  7:46 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Laurent Pinchart

On Wed, Mar 25, 2020 at 11:21:29AM +0100, Mauro Carvalho Chehab wrote:
> Em Wed, 25 Mar 2020 11:08:34 +0100
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:
> 
> > Em Wed, 25 Mar 2020 12:00:59 +0200
> > Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> > 
> > > Hi Mauro,
> > > 
> > > On Wed, Mar 25, 2020 at 10:49:29AM +0100, Mauro Carvalho Chehab wrote:
> > > > Let's place the main API selections at the media/Kconfig file,
> > > > as this way we can better organize things.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > > > ---
> > > >  drivers/media/Kconfig    | 9 +++++++++
> > > >  drivers/media/mc/Kconfig | 9 ---------
> > > >  2 files changed, 9 insertions(+), 9 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > > > index d6766085c91b..3872e46545e6 100644
> > > > --- a/drivers/media/Kconfig
> > > > +++ b/drivers/media/Kconfig
> > > > @@ -144,6 +144,15 @@ config VIDEO_DEV
> > > >  	depends on MEDIA_SUPPORT
> > > >  	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT
> > > >  
> > > > +config MEDIA_CONTROLLER
> > > > +	bool "Media Controller API"
> > > > +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > > > +	help
> > > > +	  Enable the media controller API used to query media devices internal
> > > > +	  topology and configure it dynamically.
> > > > +
> > > > +	  This API is mostly used by camera interfaces in embedded platforms.
> > > > +
> > > >  source "drivers/media/v4l2-core/Kconfig"
> > > >  
> > > >  #
> > > > diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
> > > > index 3b9795cfcb36..b3579d6c9e32 100644
> > > > --- a/drivers/media/mc/Kconfig
> > > > +++ b/drivers/media/mc/Kconfig
> > > > @@ -3,15 +3,6 @@
> > > >  #	Selectable only for webcam/grabbers, as other drivers don't use it
> > > >  #
> > > >  
> > > > -config MEDIA_CONTROLLER
> > > > -	bool "Media Controller API"
> > > > -	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
> > > > -	help
> > > > -	  Enable the media controller API used to query media devices internal
> > > > -	  topology and configure it dynamically.
> > > > -
> > > > -	  This API is mostly used by camera interfaces in embedded platforms.
> > > > -
> > > >  config MEDIA_CONTROLLER_DVB
> > > >  	bool "Enable Media controller for DVB (EXPERIMENTAL)"
> > > >  	depends on MEDIA_CONTROLLER && DVB_CORE  
> > > 
> > > This moves the main MC configuration out of the directory but leaves the
> > > rest of the MC configuration under the mc directory. All MC related
> > > configuration is currently in a single place, which makes sense.
> > > 
> > > I guess you can always have arguments for and against, but my preference is
> > > keeping it as-is.
> > 
> > Well, the advantage (after applying the entire series), is that it can now
> > present two separate menus:
> > 
> > the first one with the core stuff (MC, V4L and DVB), and a second one
> > with the extra features for those three.
> > 
> > Btw, it just occurred to me that perhaps we could map it on a different way,
> > using a menu for MC, another one for V4L and a third one for DVB.
> 
> What occurred to me is shown at the patch below (applied after this patch
> series).
> 
> IMHO, it is a way better to present things like that.

Ok; makes sense. I only thought of this Kconfig organisation point of view,
in terms of files.

It seems there's a more active discussion going on elsewhere, and perhaps
it's better to continue there.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2020-03-30  7:46 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  9:49 [PATCH v3 00/22] Reorganize media Kconfig Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 01/22] media: dvb-usb: auto-select CYPRESS_FIRMWARE Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 02/22] media: Kconfig: add an option to filter in/out platform drivers Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 03/22] media: Kconfig: not all V4L2 platform drivers are for camera Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 04/22] media: pci: move VIDEO_PCI_SKELETON to a different Kconfig Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 05/22] media: reorganize the drivers menu options Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 06/22] media: Kconfig: update the MEDIA_SUPPORT help message Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 07/22] media: Kconfig: use a sub-menu to select supported devices Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 08/22] media: split test drivers from platform directory Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 09/22] media: Kconfig: make filtering devices optional Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 10/22] media: Kconfig: move CEC-specific options to cec/Kconfig Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 11/22] media: Kconfig: move comment to siano include Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 12/22] media: Kconfig: move DVB-specific options to dvb-core/Kconfig Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 13/22] media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 14/22] media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig Mauro Carvalho Chehab
2020-03-25 10:00   ` Sakari Ailus
2020-03-25 10:08     ` Mauro Carvalho Chehab
2020-03-25 10:21       ` Mauro Carvalho Chehab
2020-03-30  7:46         ` Sakari Ailus
2020-03-25  9:49 ` [PATCH v3 16/22] media: Kconfig: better organize menu items Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig Mauro Carvalho Chehab
2020-03-26 12:09   ` Stefan Richter
2020-03-25  9:49 ` [PATCH v3 18/22] media: Kconfig: place all options under a sub-menu Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 19/22] media: Kconfig: move the position of sub-driver autoselection Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 20/22] media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 21/22] media: Kconfig: simplify some dependencies Mauro Carvalho Chehab
2020-03-25  9:49 ` [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices Mauro Carvalho Chehab
2020-03-25 10:05   ` Mauro Carvalho Chehab
2020-03-25 11:25     ` [PATCH v3.1 " Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).