summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-11-02 06:25:28 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 12:40:20 -0500
commit0dbacebede1e4e44bf500f94d692fad05eb2c293 (patch)
tree633cbfbfed04251cbdb35fe158ad81ee8ed380ef
parenta69a168a1bd470cb8a8c5f2ff4b54463de615226 (diff)
[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>
-rw-r--r--Documentation/media/Makefile2
-rw-r--r--drivers/media/Kconfig16
-rw-r--r--drivers/media/Makefile4
-rw-r--r--drivers/media/cec/Makefile (renamed from drivers/staging/media/cec/Makefile)2
-rw-r--r--drivers/media/cec/cec-adap.c (renamed from drivers/staging/media/cec/cec-adap.c)0
-rw-r--r--drivers/media/cec/cec-api.c (renamed from drivers/staging/media/cec/cec-api.c)0
-rw-r--r--drivers/media/cec/cec-core.c (renamed from drivers/staging/media/cec/cec-core.c)0
-rw-r--r--drivers/media/cec/cec-priv.h (renamed from drivers/staging/media/cec/cec-priv.h)0
-rw-r--r--drivers/media/i2c/Kconfig6
-rw-r--r--drivers/media/platform/vivid/Kconfig2
-rw-r--r--drivers/staging/media/Kconfig2
-rw-r--r--drivers/staging/media/Makefile1
-rw-r--r--drivers/staging/media/cec/Kconfig12
-rw-r--r--drivers/staging/media/cec/TODO9
-rw-r--r--drivers/staging/media/pulse8-cec/Kconfig2
-rw-r--r--drivers/staging/media/s5p-cec/Kconfig2
-rw-r--r--drivers/staging/media/st-cec/Kconfig2
-rw-r--r--include/media/cec.h2
-rw-r--r--include/uapi/linux/Kbuild2
-rw-r--r--include/uapi/linux/cec-funcs.h (renamed from include/linux/cec-funcs.h)6
-rw-r--r--include/uapi/linux/cec.h (renamed from include/linux/cec.h)6
21 files changed, 32 insertions, 46 deletions
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index a7fb35291f6c..61afa052c501 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -51,7 +51,7 @@ $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.
51$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions 51$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
52 @$($(quiet)gen_rst) 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 @$($(quiet)gen_rst) 55 @$($(quiet)gen_rst)
56 56
57$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions 57$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 7b8540291217..bc643cbf813e 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -80,6 +80,22 @@ config MEDIA_RC_SUPPORT
80 80
81 Say Y when you have a TV or an IR device. 81 Say Y when you have a TV or an IR device.
82 82
83config 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
93config 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
83config MEDIA_CEC_EDID 99config MEDIA_CEC_EDID
84 bool 100 bool
85 101
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index 0deaa93efdee..d87ccb8eeabe 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -6,6 +6,10 @@ ifeq ($(CONFIG_MEDIA_CEC_EDID),y)
6 obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.o 6 obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.o
7endif 7endif
8 8
9ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
10 obj-$(CONFIG_MEDIA_SUPPORT) += cec/
11endif
12
9media-objs := media-device.o media-devnode.o media-entity.o 13media-objs := media-device.o media-devnode.o media-entity.o
10 14
11# 15#
diff --git a/drivers/staging/media/cec/Makefile b/drivers/media/cec/Makefile
index bd7f3c593468..d6686337275f 100644
--- a/drivers/staging/media/cec/Makefile
+++ b/drivers/media/cec/Makefile
@@ -1,5 +1,5 @@
1cec-objs := cec-core.o cec-adap.o cec-api.o 1cec-objs := cec-core.o cec-adap.o cec-api.o
2 2
3ifeq ($(CONFIG_MEDIA_CEC),y) 3ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
4 obj-$(CONFIG_MEDIA_SUPPORT) += cec.o 4 obj-$(CONFIG_MEDIA_SUPPORT) += cec.o
5endif 5endif
diff --git a/drivers/staging/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index 054cd06e2247..054cd06e2247 100644
--- a/drivers/staging/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/media/cec/cec-api.c
index d4bc4ee2c6e5..d4bc4ee2c6e5 100644
--- a/drivers/staging/media/cec/cec-api.c
+++ b/drivers/media/cec/cec-api.c
diff --git a/drivers/staging/media/cec/cec-core.c b/drivers/media/cec/cec-core.c
index b0137e247dc9..b0137e247dc9 100644
--- a/drivers/staging/media/cec/cec-core.c
+++ b/drivers/media/cec/cec-core.c
diff --git a/drivers/staging/media/cec/cec-priv.h b/drivers/media/cec/cec-priv.h
index 70767a7900f2..70767a7900f2 100644
--- a/drivers/staging/media/cec/cec-priv.h
+++ b/drivers/media/cec/cec-priv.h
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 2669b4bad910..b31fa6fae009 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -221,7 +221,7 @@ config VIDEO_ADV7604
221 221
222config VIDEO_ADV7604_CEC 222config VIDEO_ADV7604_CEC
223 bool "Enable Analog Devices ADV7604 CEC support" 223 bool "Enable Analog Devices ADV7604 CEC support"
224 depends on VIDEO_ADV7604 && MEDIA_CEC 224 depends on VIDEO_ADV7604 && MEDIA_CEC_SUPPORT
225 ---help--- 225 ---help---
226 When selected the adv7604 will support the optional 226 When selected the adv7604 will support the optional
227 HDMI CEC feature. 227 HDMI CEC feature.
@@ -242,7 +242,7 @@ config VIDEO_ADV7842
242 242
243config VIDEO_ADV7842_CEC 243config VIDEO_ADV7842_CEC
244 bool "Enable Analog Devices ADV7842 CEC support" 244 bool "Enable Analog Devices ADV7842 CEC support"
245 depends on VIDEO_ADV7842 && MEDIA_CEC 245 depends on VIDEO_ADV7842 && MEDIA_CEC_SUPPORT
246 ---help--- 246 ---help---
247 When selected the adv7842 will support the optional 247 When selected the adv7842 will support the optional
248 HDMI CEC feature. 248 HDMI CEC feature.
@@ -481,7 +481,7 @@ config VIDEO_ADV7511
481 481
482config VIDEO_ADV7511_CEC 482config VIDEO_ADV7511_CEC
483 bool "Enable Analog Devices ADV7511 CEC support" 483 bool "Enable Analog Devices ADV7511 CEC support"
484 depends on VIDEO_ADV7511 && MEDIA_CEC 484 depends on VIDEO_ADV7511 && MEDIA_CEC_SUPPORT
485 ---help--- 485 ---help---
486 When selected the adv7511 will support the optional 486 When selected the adv7511 will support the optional
487 HDMI CEC feature. 487 HDMI CEC feature.
diff --git a/drivers/media/platform/vivid/Kconfig b/drivers/media/platform/vivid/Kconfig
index 8e6918c5c87c..db0dd19d227a 100644
--- a/drivers/media/platform/vivid/Kconfig
+++ b/drivers/media/platform/vivid/Kconfig
@@ -25,7 +25,7 @@ config VIDEO_VIVID
25 25
26config VIDEO_VIVID_CEC 26config VIDEO_VIVID_CEC
27 bool "Enable CEC emulation support" 27 bool "Enable CEC emulation support"
28 depends on VIDEO_VIVID && MEDIA_CEC 28 depends on VIDEO_VIVID && MEDIA_CEC_SUPPORT
29 ---help--- 29 ---help---
30 When selected the vivid module will emulate the optional 30 When selected the vivid module will emulate the optional
31 HDMI CEC feature. 31 HDMI CEC feature.
diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig
index 6620d96ee44d..0abe5ffb4934 100644
--- a/drivers/staging/media/Kconfig
+++ b/drivers/staging/media/Kconfig
@@ -21,8 +21,6 @@ if STAGING_MEDIA && MEDIA_SUPPORT
21# Please keep them in alphabetic order 21# Please keep them in alphabetic order
22source "drivers/staging/media/bcm2048/Kconfig" 22source "drivers/staging/media/bcm2048/Kconfig"
23 23
24source "drivers/staging/media/cec/Kconfig"
25
26source "drivers/staging/media/cxd2099/Kconfig" 24source "drivers/staging/media/cxd2099/Kconfig"
27 25
28source "drivers/staging/media/davinci_vpfe/Kconfig" 26source "drivers/staging/media/davinci_vpfe/Kconfig"
diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile
index 906257e94dda..246299eff80d 100644
--- a/drivers/staging/media/Makefile
+++ b/drivers/staging/media/Makefile
@@ -1,5 +1,4 @@
1obj-$(CONFIG_I2C_BCM2048) += bcm2048/ 1obj-$(CONFIG_I2C_BCM2048) += bcm2048/
2obj-$(CONFIG_MEDIA_CEC) += cec/
3obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/ 2obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/
4obj-$(CONFIG_DVB_CXD2099) += cxd2099/ 3obj-$(CONFIG_DVB_CXD2099) += cxd2099/
5obj-$(CONFIG_LIRC_STAGING) += lirc/ 4obj-$(CONFIG_LIRC_STAGING) += lirc/
diff --git a/drivers/staging/media/cec/Kconfig b/drivers/staging/media/cec/Kconfig
deleted file mode 100644
index 6e12d41b1f86..000000000000
--- a/drivers/staging/media/cec/Kconfig
+++ /dev/null
@@ -1,12 +0,0 @@
1config 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
8config 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.
diff --git a/drivers/staging/media/cec/TODO b/drivers/staging/media/cec/TODO
deleted file mode 100644
index 504d35c7ae95..000000000000
--- a/drivers/staging/media/cec/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
1TODOs:
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
9Hans Verkuil <hans.verkuil@cisco.com>
diff --git a/drivers/staging/media/pulse8-cec/Kconfig b/drivers/staging/media/pulse8-cec/Kconfig
index c6aa2d1c9df0..6ffc407de62f 100644
--- a/drivers/staging/media/pulse8-cec/Kconfig
+++ b/drivers/staging/media/pulse8-cec/Kconfig
@@ -1,6 +1,6 @@
1config USB_PULSE8_CEC 1config USB_PULSE8_CEC
2 tristate "Pulse Eight HDMI CEC" 2 tristate "Pulse Eight HDMI CEC"
3 depends on USB_ACM && MEDIA_CEC 3 depends on USB_ACM && MEDIA_CEC_SUPPORT
4 select SERIO 4 select SERIO
5 select SERIO_SERPORT 5 select SERIO_SERPORT
6 ---help--- 6 ---help---
diff --git a/drivers/staging/media/s5p-cec/Kconfig b/drivers/staging/media/s5p-cec/Kconfig
index 0315fd7ad0f1..ddfd955da0d4 100644
--- a/drivers/staging/media/s5p-cec/Kconfig
+++ b/drivers/staging/media/s5p-cec/Kconfig
@@ -1,6 +1,6 @@
1config VIDEO_SAMSUNG_S5P_CEC 1config VIDEO_SAMSUNG_S5P_CEC
2 tristate "Samsung S5P CEC driver" 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 ---help--- 4 ---help---
5 This is a driver for Samsung S5P HDMI CEC interface. It uses the 5 This is a driver for Samsung S5P HDMI CEC interface. It uses the
6 generic CEC framework interface. 6 generic CEC framework interface.
diff --git a/drivers/staging/media/st-cec/Kconfig b/drivers/staging/media/st-cec/Kconfig
index 784d2c600aca..c04283db58d6 100644
--- a/drivers/staging/media/st-cec/Kconfig
+++ b/drivers/staging/media/st-cec/Kconfig
@@ -1,6 +1,6 @@
1config VIDEO_STI_HDMI_CEC 1config VIDEO_STI_HDMI_CEC
2 tristate "STMicroelectronics STiH4xx HDMI CEC driver" 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 ---help--- 4 ---help---
5 This is a driver for STIH4xx HDMI CEC interface. It uses the 5 This is a driver for STIH4xx HDMI CEC interface. It uses the
6 generic CEC framework interface. 6 generic CEC framework interface.
diff --git a/include/media/cec.h b/include/media/cec.h
index fdb5d600e4bb..717eaf552f3d 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -196,7 +196,7 @@ static inline bool cec_is_sink(const struct cec_adapter *adap)
196 return adap->phys_addr == 0; 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)
200struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, 200struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
201 void *priv, const char *name, u32 caps, u8 available_las, 201 void *priv, const char *name, u32 caps, u8 available_las,
202 struct device *parent); 202 struct device *parent);
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 6965d0909554..c49c448cff92 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -82,6 +82,8 @@ header-y += capi.h
82header-y += cciss_defs.h 82header-y += cciss_defs.h
83header-y += cciss_ioctl.h 83header-y += cciss_ioctl.h
84header-y += cdrom.h 84header-y += cdrom.h
85header-y += cec.h
86header-y += cec-funcs.h
85header-y += cgroupstats.h 87header-y += cgroupstats.h
86header-y += chio.h 88header-y += chio.h
87header-y += cm4000_cs.h 89header-y += cm4000_cs.h
diff --git a/include/linux/cec-funcs.h b/include/uapi/linux/cec-funcs.h
index 138bbf721e70..1a1de2169f48 100644
--- a/include/linux/cec-funcs.h
+++ b/include/uapi/linux/cec-funcs.h
@@ -33,12 +33,6 @@
33 * SOFTWARE. 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#ifndef _CEC_UAPI_FUNCS_H 36#ifndef _CEC_UAPI_FUNCS_H
43#define _CEC_UAPI_FUNCS_H 37#define _CEC_UAPI_FUNCS_H
44 38
diff --git a/include/linux/cec.h b/include/uapi/linux/cec.h
index 9c87711c0e1c..f4ec0af67707 100644
--- a/include/linux/cec.h
+++ b/include/uapi/linux/cec.h
@@ -33,12 +33,6 @@
33 * SOFTWARE. 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#ifndef _CEC_UAPI_H 36#ifndef _CEC_UAPI_H
43#define _CEC_UAPI_H 37#define _CEC_UAPI_H
44 38