History

[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.

Hans Verkuil committed 10 years ago

Commit 0dbaceb1 parent a69a16821 files · +32 −46Browse files

Unified · Split

21 files
  1. Documentation/media/Makefile +1 −1
  2. drivers/media/Kconfig +16 −0
  3. drivers/media/Makefile +4 −0
  4. drivers/media/cec/Makefile +1 −1
  5. drivers/media/cec/cec-adap.c +0 −0
  6. drivers/media/cec/cec-api.c +0 −0
  7. drivers/media/cec/cec-core.c +0 −0
  8. drivers/media/cec/cec-priv.h +0 −0
  9. drivers/media/i2c/Kconfig +3 −3
  10. drivers/media/platform/vivid/Kconfig +1 −1
  11. drivers/staging/media/Kconfig +0 −2
  12. drivers/staging/media/Makefile +0 −1
  13. drivers/staging/media/cec/Kconfig +0 −12
  14. drivers/staging/media/cec/TODO +0 −9
  15. drivers/staging/media/pulse8-cec/Kconfig +1 −1
  16. drivers/staging/media/s5p-cec/Kconfig +1 −1
  17. drivers/staging/media/st-cec/Kconfig +1 −1
  18. include/media/cec.h +1 −1
  19. include/uapi/linux/Kbuild +2 −0
  20. include/uapi/linux/cec-funcs.h +0 −6
  21. include/uapi/linux/cec.h +0 −6
Documentation/media/Makefile+1−1
@@ -51,7 +51,7 @@ $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2. · 50 unmodified lines
5151 $(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
5252 @$($(quiet)gen_rst)
5353
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
5555 @$($(quiet)gen_rst)
5656
5757 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
drivers/media/Kconfig+16−0
@@ -80,6 +80,22 @@ config MEDIA_RC_SUPPORT · 79 unmodified lines
8080
8181 Say Y when you have a TV or an IR device.
8282
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+
8399 config MEDIA_CEC_EDID
84100 bool
85101
drivers/media/Makefile+4−0
@@ -6,6 +6,10 @@ ifeq ($(CONFIG_MEDIA_CEC_EDID),y) · 5 unmodified lines
66 obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.o
77 endif
88
9+ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
10+ obj-$(CONFIG_MEDIA_SUPPORT) += cec/
11+endif
12+
913 media-objs := media-device.o media-devnode.o media-entity.o
1014
1115 #
drivers/media/cec/Makefilerenamed from drivers/staging/media/cec/Makefile+1−1
@@ -1,5 +1,5 @@
11 cec-objs := cec-core.o cec-adap.o cec-api.o
22
3−ifeq ($(CONFIG_MEDIA_CEC),y)
3+ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
44 obj-$(CONFIG_MEDIA_SUPPORT) += cec.o
55 endif
drivers/media/cec/cec-adap.crenamed from drivers/staging/media/cec/cec-adap.c+0−0

File renamed without changes.

drivers/media/cec/cec-api.crenamed from drivers/staging/media/cec/cec-api.c+0−0

File renamed without changes.

drivers/media/cec/cec-core.crenamed from drivers/staging/media/cec/cec-core.c+0−0

File renamed without changes.

drivers/media/cec/cec-priv.hrenamed from drivers/staging/media/cec/cec-priv.h+0−0

File renamed without changes.

drivers/media/i2c/Kconfig+3−3
@@ -221,7 +221,7 @@ config VIDEO_ADV7604 · 220 unmodified lines
221221
222222 config VIDEO_ADV7604_CEC
223223 bool "Enable Analog Devices ADV7604 CEC support"
224− depends on VIDEO_ADV7604 && MEDIA_CEC
224+ depends on VIDEO_ADV7604 && MEDIA_CEC_SUPPORT
225225 ---help---
226226 When selected the adv7604 will support the optional
227227 HDMI CEC feature.
@@ -242,7 +242,7 @@ config VIDEO_ADV7842 · 14 unmodified lines
242242
243243 config VIDEO_ADV7842_CEC
244244 bool "Enable Analog Devices ADV7842 CEC support"
245− depends on VIDEO_ADV7842 && MEDIA_CEC
245+ depends on VIDEO_ADV7842 && MEDIA_CEC_SUPPORT
246246 ---help---
247247 When selected the adv7842 will support the optional
248248 HDMI CEC feature.
@@ -481,7 +481,7 @@ config VIDEO_ADV7511 · 232 unmodified lines
481481
482482 config VIDEO_ADV7511_CEC
483483 bool "Enable Analog Devices ADV7511 CEC support"
484− depends on VIDEO_ADV7511 && MEDIA_CEC
484+ depends on VIDEO_ADV7511 && MEDIA_CEC_SUPPORT
485485 ---help---
486486 When selected the adv7511 will support the optional
487487 HDMI CEC feature.
drivers/media/platform/vivid/Kconfig+1−1
@@ -25,7 +25,7 @@ config VIDEO_VIVID · 24 unmodified lines
2525
2626 config VIDEO_VIVID_CEC
2727 bool "Enable CEC emulation support"
28− depends on VIDEO_VIVID && MEDIA_CEC
28+ depends on VIDEO_VIVID && MEDIA_CEC_SUPPORT
2929 ---help---
3030 When selected the vivid module will emulate the optional
3131 HDMI CEC feature.
drivers/staging/media/Kconfig+0−2
@@ -21,8 +21,6 @@ if STAGING_MEDIA && MEDIA_SUPPORT · 20 unmodified lines
2121 # Please keep them in alphabetic order
2222 source "drivers/staging/media/bcm2048/Kconfig"
2323
24−source "drivers/staging/media/cec/Kconfig"
25−
2624 source "drivers/staging/media/cxd2099/Kconfig"
2725
2826 source "drivers/staging/media/davinci_vpfe/Kconfig"
drivers/staging/media/Makefile+0−1
@@ -1,5 +1,4 @@
11 obj-$(CONFIG_I2C_BCM2048) += bcm2048/
2−obj-$(CONFIG_MEDIA_CEC) += cec/
32 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/
43 obj-$(CONFIG_DVB_CXD2099) += cxd2099/
54 obj-$(CONFIG_LIRC_STAGING) += lirc/
drivers/staging/media/cec/Kconfig+0−12
@@ -1,12 +0,0 @@
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.
drivers/staging/media/cec/TODO+0−9
@@ -1,9 +0,0 @@
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/pulse8-cec/Kconfig+1−1
@@ -1,6 +1,6 @@
11 config USB_PULSE8_CEC
22 tristate "Pulse Eight HDMI CEC"
3− depends on USB_ACM && MEDIA_CEC
3+ depends on USB_ACM && MEDIA_CEC_SUPPORT
44 select SERIO
55 select SERIO_SERPORT
66 ---help---
drivers/staging/media/s5p-cec/Kconfig+1−1
@@ -1,6 +1,6 @@
11 config VIDEO_SAMSUNG_S5P_CEC
22 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)
44 ---help---
55 This is a driver for Samsung S5P HDMI CEC interface. It uses the
66 generic CEC framework interface.
drivers/staging/media/st-cec/Kconfig+1−1
@@ -1,6 +1,6 @@
11 config VIDEO_STI_HDMI_CEC
22 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)
44 ---help---
55 This is a driver for STIH4xx HDMI CEC interface. It uses the
66 generic CEC framework interface.
include/media/cec.h+1−1
@@ -196,7 +196,7 @@ static inline bool cec_is_sink(const struct cec_adapter *adap) · 195 unmodified lines
196196 return adap->phys_addr == 0;
197197 }
198198
199−#if IS_ENABLED(CONFIG_MEDIA_CEC)
199+#if IS_ENABLED(CONFIG_MEDIA_CEC_SUPPORT)
200200 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
201201 void *priv, const char *name, u32 caps, u8 available_las,
202202 struct device *parent);
include/uapi/linux/Kbuild+2−0
@@ -82,6 +82,8 @@ header-y += capi.h · 81 unmodified lines
8282 header-y += cciss_defs.h
8383 header-y += cciss_ioctl.h
8484 header-y += cdrom.h
85+header-y += cec.h
86+header-y += cec-funcs.h
8587 header-y += cgroupstats.h
8688 header-y += chio.h
8789 header-y += cm4000_cs.h
include/uapi/linux/cec-funcs.hrenamed from include/linux/cec-funcs.h+0−6
@@ -33,12 +33,6 @@ · 32 unmodified lines
3333 * SOFTWARE.
3434 */
3535
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− */
4236 #ifndef _CEC_UAPI_FUNCS_H
4337 #define _CEC_UAPI_FUNCS_H
4438
include/uapi/linux/cec.hrenamed from include/linux/cec.h+0−6
@@ -33,12 +33,6 @@ · 32 unmodified lines
3333 * SOFTWARE.
3434 */
3535
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− */
4236 #ifndef _CEC_UAPI_H
4337 #define _CEC_UAPI_H
4438