Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56a263aa authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] cec: Kconfig cleanup



The Kconfig options for the CEC subsystem were a bit messy. In
addition there were two cec sources (cec-edid.c and cec-notifier.c)
that were outside of the media/cec directory, which was weird.

Move those sources to media/cec as well.

The cec-edid and cec-notifier functionality is now part of the cec
module and these are no longer separate modules.

Also remove the MEDIA_CEC_EDID config option and include it with the
main CEC config option (which defined CEC_EDID anyway).

Added static inlines to cec-edid.h for dummy functions when CEC_CORE
isn't defined.

CEC drivers should now depend on CEC_CORE.

CEC drivers that need the cec-notifier functionality must explicitly
select CEC_NOTIFIER.

The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
CEC_CORE, fix that as well.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ee0fe833
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3075,8 +3075,6 @@ S: Supported
F:	Documentation/media/kapi/cec-core.rst
F:	Documentation/media/uapi/cec
F:	drivers/media/cec/
F:	drivers/media/cec-edid.c
F:	drivers/media/cec-notifier.c
F:	drivers/media/rc/keymaps/rc-cec.c
F:	include/media/cec.h
F:	include/media/cec-edid.h
+7 −19
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ config MEDIA_RC_SUPPORT

config MEDIA_CEC_SUPPORT
       bool "HDMI CEC support"
	select MEDIA_CEC_EDID
       ---help---
         Enable support for HDMI CEC (Consumer Electronics Control),
         which is an optional HDMI feature.
@@ -90,18 +89,7 @@ config MEDIA_CEC_SUPPORT
         Say Y when you have an HDMI receiver, transmitter or a USB CEC
         adapter that supports HDMI CEC.

config MEDIA_CEC_DEBUG
	bool "HDMI CEC debugfs interface"
	depends on MEDIA_CEC_SUPPORT && DEBUG_FS
	---help---
	  Turns on the DebugFS interface for CEC devices.

config MEDIA_CEC_EDID
	bool

config MEDIA_CEC_NOTIFIER
	bool
	select MEDIA_CEC_EDID
source "drivers/media/cec/Kconfig"

#
# Media controller
+2 −12
Original line number Diff line number Diff line
@@ -2,20 +2,10 @@
# Makefile for the kernel multimedia device drivers.
#

ifeq ($(CONFIG_MEDIA_CEC_EDID),y)
  obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.o
endif

ifeq ($(CONFIG_MEDIA_CEC_NOTIFIER),y)
  obj-$(CONFIG_MEDIA_SUPPORT) += cec-notifier.o
endif

ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
  obj-$(CONFIG_MEDIA_SUPPORT) += cec/
endif

media-objs	:= media-device.o media-devnode.o media-entity.o

obj-$(CONFIG_CEC_CORE) += cec/

#
# I2C drivers should come before other drivers, otherwise they'll fail
# when compiled as builtin drivers
+13 −0
Original line number Diff line number Diff line
config CEC_CORE
	tristate
	depends on MEDIA_CEC_SUPPORT
	default y

config MEDIA_CEC_NOTIFIER
	bool

config MEDIA_CEC_DEBUG
	bool "HDMI CEC debugfs interface"
	depends on MEDIA_CEC_SUPPORT && DEBUG_FS
	---help---
	  Turns on the DebugFS interface for CEC devices.
+5 −3
Original line number Diff line number Diff line
cec-objs := cec-core.o cec-adap.o cec-api.o
cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.o

ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
  obj-$(CONFIG_MEDIA_SUPPORT) += cec.o
ifeq ($(CONFIG_MEDIA_CEC_NOTIFIER),y)
  cec-objs += cec-notifier.o
endif

obj-$(CONFIG_CEC_CORE) += cec.o
Loading