* [PATCH] media: Kconfig: make filtering devices optional
@ 2020-03-24 12:01 Mauro Carvalho Chehab
2020-03-24 12:04 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-24 12:01 UTC (permalink / raw)
To: Linux Doc Mailing List
Cc: Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet
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>
---
v2: simplify the Kconfig options by using a visible menu
drivers/media/Kconfig | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 4c06728a4ab7..e372029ac41f 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_EMBEDDED_SUPPORT
bool "Embedded devices (SoC)"
+ default y if !MEDIA_SUPPORT_FILTER
help
Enable support for complex cameras, codecs, and other hardware
found on Embedded hardware (SoC).
@@ -98,6 +122,7 @@ config MEDIA_EMBEDDED_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
@@ -106,10 +131,7 @@ config MEDIA_TEST_SUPPORT
have regressions.
Say Y when you have a software defined radio device.
-
-endmenu # media support types
-
-if MEDIA_SUPPORT
+endmenu # media device types
comment "Media core options"
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: Kconfig: make filtering devices optional
2020-03-24 12:01 [PATCH] media: Kconfig: make filtering devices optional Mauro Carvalho Chehab
@ 2020-03-24 12:04 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-24 12:04 UTC (permalink / raw)
To: Linux Doc Mailing List; +Cc: linux-kernel, Jonathan Corbet
Em Tue, 24 Mar 2020 13:01:21 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:
> 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.
In time: title here should be [PATCH v2].
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>
> v2: simplify the Kconfig options by using a visible menu
>
> drivers/media/Kconfig | 32 +++++++++++++++++++++++++++-----
> 1 file changed, 27 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index 4c06728a4ab7..e372029ac41f 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_EMBEDDED_SUPPORT
> bool "Embedded devices (SoC)"
> + default y if !MEDIA_SUPPORT_FILTER
> help
> Enable support for complex cameras, codecs, and other hardware
> found on Embedded hardware (SoC).
> @@ -98,6 +122,7 @@ config MEDIA_EMBEDDED_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
> @@ -106,10 +131,7 @@ config MEDIA_TEST_SUPPORT
> have regressions.
>
> Say Y when you have a software defined radio device.
> -
> -endmenu # media support types
> -
> -if MEDIA_SUPPORT
> +endmenu # media device types
>
> comment "Media core options"
>
Thanks,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] media: Kconfig: make filtering devices optional
@ 2020-03-24 10:39 Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-03-24 10:39 UTC (permalink / raw)
To: Linux Doc Mailing List
Cc: Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet
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 | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 4c06728a4ab7..85476197837c 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -25,9 +25,13 @@ 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
+
+menuconfig MEDIA_SUPPORT_FILTER
+ bool "Filter devices by their types"
depends on MEDIA_SUPPORT
+if MEDIA_SUPPORT_FILTER
#
# Multimedia support - automatically enable V4L2 and DVB core
#
@@ -106,10 +110,41 @@ config MEDIA_TEST_SUPPORT
have regressions.
Say Y when you have a software defined radio device.
+endif #MEDIA_SUPPORT_FILTER
-endmenu # media support types
+if !MEDIA_SUPPORT_FILTER
+config MEDIA_CAMERA_SUPPORT
+ bool
+ default y
-if MEDIA_SUPPORT
+config MEDIA_ANALOG_TV_SUPPORT
+ bool
+ default y
+
+config MEDIA_DIGITAL_TV_SUPPORT
+ bool
+ default y
+
+config MEDIA_RADIO_SUPPORT
+ bool
+ default y
+
+config MEDIA_SDR_SUPPORT
+ bool
+ default y
+
+config MEDIA_CEC_SUPPORT
+ bool
+ default y
+
+config MEDIA_EMBEDDED_SUPPORT
+ bool
+ default y
+
+config MEDIA_TEST_SUPPORT
+ bool
+ default y
+endif #MEDIA_SUPPORT_FILTER
comment "Media core options"
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-24 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 12:01 [PATCH] media: Kconfig: make filtering devices optional Mauro Carvalho Chehab
2020-03-24 12:04 ` Mauro Carvalho Chehab
-- strict thread matches above, loose matches on Subject: below --
2020-03-24 10:39 Mauro Carvalho Chehab
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.