Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] cec: move the CEC framework out of staging and to media

The last open issues have been addressed, so it is time to move
this out of staging and into the mainline and to move the public
cec headers to include/uapi/linux.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
0dbacebe a69a168a

+32 -46
+1 -1
Documentation/media/Makefile
··· 51 51 $(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions 52 52 @$($(quiet)gen_rst) 53 53 54 - $(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions 54 + $(BUILDDIR)/cec.h.rst: ${UAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions 55 55 @$($(quiet)gen_rst) 56 56 57 57 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
+16
drivers/media/Kconfig
··· 80 80 81 81 Say Y when you have a TV or an IR device. 82 82 83 + config MEDIA_CEC_SUPPORT 84 + bool "HDMI CEC support" 85 + select MEDIA_CEC_EDID 86 + ---help--- 87 + Enable support for HDMI CEC (Consumer Electronics Control), 88 + which is an optional HDMI feature. 89 + 90 + Say Y when you have an HDMI receiver, transmitter or a USB CEC 91 + adapter that supports HDMI CEC. 92 + 93 + config MEDIA_CEC_DEBUG 94 + bool "HDMI CEC debugfs interface" 95 + depends on MEDIA_CEC_SUPPORT && DEBUG_FS 96 + ---help--- 97 + Turns on the DebugFS interface for CEC devices. 98 + 83 99 config MEDIA_CEC_EDID 84 100 bool 85 101
+4
drivers/media/Makefile
··· 6 6 obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.o 7 7 endif 8 8 9 + ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y) 10 + obj-$(CONFIG_MEDIA_SUPPORT) += cec/ 11 + endif 12 + 9 13 media-objs := media-device.o media-devnode.o media-entity.o 10 14 11 15 #
+3 -3
drivers/media/i2c/Kconfig
··· 221 221 222 222 config VIDEO_ADV7604_CEC 223 223 bool "Enable Analog Devices ADV7604 CEC support" 224 - depends on VIDEO_ADV7604 && MEDIA_CEC 224 + depends on VIDEO_ADV7604 && MEDIA_CEC_SUPPORT 225 225 ---help--- 226 226 When selected the adv7604 will support the optional 227 227 HDMI CEC feature. ··· 242 242 243 243 config VIDEO_ADV7842_CEC 244 244 bool "Enable Analog Devices ADV7842 CEC support" 245 - depends on VIDEO_ADV7842 && MEDIA_CEC 245 + depends on VIDEO_ADV7842 && MEDIA_CEC_SUPPORT 246 246 ---help--- 247 247 When selected the adv7842 will support the optional 248 248 HDMI CEC feature. ··· 481 481 482 482 config VIDEO_ADV7511_CEC 483 483 bool "Enable Analog Devices ADV7511 CEC support" 484 - depends on VIDEO_ADV7511 && MEDIA_CEC 484 + depends on VIDEO_ADV7511 && MEDIA_CEC_SUPPORT 485 485 ---help--- 486 486 When selected the adv7511 will support the optional 487 487 HDMI CEC feature.
+1 -1
drivers/media/platform/vivid/Kconfig
··· 25 25 26 26 config VIDEO_VIVID_CEC 27 27 bool "Enable CEC emulation support" 28 - depends on VIDEO_VIVID && MEDIA_CEC 28 + depends on VIDEO_VIVID && MEDIA_CEC_SUPPORT 29 29 ---help--- 30 30 When selected the vivid module will emulate the optional 31 31 HDMI CEC feature.
-2
drivers/staging/media/Kconfig
··· 21 21 # Please keep them in alphabetic order 22 22 source "drivers/staging/media/bcm2048/Kconfig" 23 23 24 - source "drivers/staging/media/cec/Kconfig" 25 - 26 24 source "drivers/staging/media/cxd2099/Kconfig" 27 25 28 26 source "drivers/staging/media/davinci_vpfe/Kconfig"
-1
drivers/staging/media/Makefile
··· 1 1 obj-$(CONFIG_I2C_BCM2048) += bcm2048/ 2 - obj-$(CONFIG_MEDIA_CEC) += cec/ 3 2 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/ 4 3 obj-$(CONFIG_DVB_CXD2099) += cxd2099/ 5 4 obj-$(CONFIG_LIRC_STAGING) += lirc/
-12
drivers/staging/media/cec/Kconfig
··· 1 - config MEDIA_CEC 2 - bool "CEC API (EXPERIMENTAL)" 3 - depends on MEDIA_SUPPORT 4 - select MEDIA_CEC_EDID 5 - ---help--- 6 - Enable the CEC API. 7 - 8 - config MEDIA_CEC_DEBUG 9 - bool "CEC debugfs interface (EXPERIMENTAL)" 10 - depends on MEDIA_CEC && DEBUG_FS 11 - ---help--- 12 - Turns on the DebugFS interface for CEC devices.
+1 -1
drivers/staging/media/cec/Makefile drivers/media/cec/Makefile
··· 1 1 cec-objs := cec-core.o cec-adap.o cec-api.o 2 2 3 - ifeq ($(CONFIG_MEDIA_CEC),y) 3 + ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y) 4 4 obj-$(CONFIG_MEDIA_SUPPORT) += cec.o 5 5 endif
-9
drivers/staging/media/cec/TODO
··· 1 - TODOs: 2 - 3 - - Once this is out of staging this should no longer be a separate 4 - config option, instead it should be selected by drivers that want it. 5 - - Revisit the IS_REACHABLE(RC_CORE): perhaps the RC_CORE support should 6 - be enabled through a separate config option in drivers/media/Kconfig 7 - or rc/Kconfig? 8 - 9 - Hans Verkuil <hans.verkuil@cisco.com>
drivers/staging/media/cec/cec-adap.c drivers/media/cec/cec-adap.c
drivers/staging/media/cec/cec-api.c drivers/media/cec/cec-api.c
drivers/staging/media/cec/cec-core.c drivers/media/cec/cec-core.c
drivers/staging/media/cec/cec-priv.h drivers/media/cec/cec-priv.h
+1 -1
drivers/staging/media/pulse8-cec/Kconfig
··· 1 1 config USB_PULSE8_CEC 2 2 tristate "Pulse Eight HDMI CEC" 3 - depends on USB_ACM && MEDIA_CEC 3 + depends on USB_ACM && MEDIA_CEC_SUPPORT 4 4 select SERIO 5 5 select SERIO_SERPORT 6 6 ---help---
+1 -1
drivers/staging/media/s5p-cec/Kconfig
··· 1 1 config VIDEO_SAMSUNG_S5P_CEC 2 2 tristate "Samsung S5P CEC driver" 3 - depends on VIDEO_DEV && MEDIA_CEC && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST) 3 + depends on VIDEO_DEV && MEDIA_CEC_SUPPORT && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST) 4 4 ---help--- 5 5 This is a driver for Samsung S5P HDMI CEC interface. It uses the 6 6 generic CEC framework interface.
+1 -1
drivers/staging/media/st-cec/Kconfig
··· 1 1 config VIDEO_STI_HDMI_CEC 2 2 tristate "STMicroelectronics STiH4xx HDMI CEC driver" 3 - depends on VIDEO_DEV && MEDIA_CEC && (ARCH_STI || COMPILE_TEST) 3 + depends on VIDEO_DEV && MEDIA_CEC_SUPPORT && (ARCH_STI || COMPILE_TEST) 4 4 ---help--- 5 5 This is a driver for STIH4xx HDMI CEC interface. It uses the 6 6 generic CEC framework interface.
-6
include/linux/cec-funcs.h include/uapi/linux/cec-funcs.h
··· 33 33 * SOFTWARE. 34 34 */ 35 35 36 - /* 37 - * Note: this framework is still in staging and it is likely the API 38 - * will change before it goes out of staging. 39 - * 40 - * Once it is moved out of staging this header will move to uapi. 41 - */ 42 36 #ifndef _CEC_UAPI_FUNCS_H 43 37 #define _CEC_UAPI_FUNCS_H 44 38
-6
include/linux/cec.h include/uapi/linux/cec.h
··· 33 33 * SOFTWARE. 34 34 */ 35 35 36 - /* 37 - * Note: this framework is still in staging and it is likely the API 38 - * will change before it goes out of staging. 39 - * 40 - * Once it is moved out of staging this header will move to uapi. 41 - */ 42 36 #ifndef _CEC_UAPI_H 43 37 #define _CEC_UAPI_H 44 38
+1 -1
include/media/cec.h
··· 196 196 return adap->phys_addr == 0; 197 197 } 198 198 199 - #if IS_ENABLED(CONFIG_MEDIA_CEC) 199 + #if IS_ENABLED(CONFIG_MEDIA_CEC_SUPPORT) 200 200 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, 201 201 void *priv, const char *name, u32 caps, u8 available_las, 202 202 struct device *parent);
+2
include/uapi/linux/Kbuild
··· 82 82 header-y += cciss_defs.h 83 83 header-y += cciss_ioctl.h 84 84 header-y += cdrom.h 85 + header-y += cec.h 86 + header-y += cec-funcs.h 85 87 header-y += cgroupstats.h 86 88 header-y += chio.h 87 89 header-y += cm4000_cs.h