]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] cec: move the CEC framework out of staging and to media
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 2 Nov 2016 10:25:28 +0000 (08:25 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 17:40:20 +0000 (15:40 -0200)
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>
21 files changed:
Documentation/media/Makefile
drivers/media/Kconfig
drivers/media/Makefile
drivers/media/cec/Makefile [moved from drivers/staging/media/cec/Makefile with 70% similarity]
drivers/media/cec/cec-adap.c [moved from drivers/staging/media/cec/cec-adap.c with 100% similarity]
drivers/media/cec/cec-api.c [moved from drivers/staging/media/cec/cec-api.c with 100% similarity]
drivers/media/cec/cec-core.c [moved from drivers/staging/media/cec/cec-core.c with 100% similarity]
drivers/media/cec/cec-priv.h [moved from drivers/staging/media/cec/cec-priv.h with 100% similarity]
drivers/media/i2c/Kconfig
drivers/media/platform/vivid/Kconfig
drivers/staging/media/Kconfig
drivers/staging/media/Makefile
drivers/staging/media/cec/Kconfig [deleted file]
drivers/staging/media/cec/TODO [deleted file]
drivers/staging/media/pulse8-cec/Kconfig
drivers/staging/media/s5p-cec/Kconfig
drivers/staging/media/st-cec/Kconfig
include/media/cec.h
include/uapi/linux/Kbuild
include/uapi/linux/cec-funcs.h [moved from include/linux/cec-funcs.h with 99% similarity]
include/uapi/linux/cec.h [moved from include/linux/cec.h with 99% similarity]

index a7fb35291f6c6148de9f051e49c8f7818f307fb8..61afa052c501a1ef0b2eb18b681434e916d80988 100644 (file)
@@ -51,7 +51,7 @@ $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.
 $(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
        @$($(quiet)gen_rst)
 
-$(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
+$(BUILDDIR)/cec.h.rst: ${UAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
        @$($(quiet)gen_rst)
 
 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
index 7b8540291217317cba7ea679d945761ee238dfae..bc643cbf813ef8150f9062d3c90845b962253d1c 100644 (file)
@@ -80,6 +80,22 @@ config MEDIA_RC_SUPPORT
 
          Say Y when you have a TV or an IR device.
 
+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.
+
+         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
 
index 0deaa93efdee618367893d6ada686263950a8852..d87ccb8eeabe6b15c8664ae625dae298b6dd53ef 100644 (file)
@@ -6,6 +6,10 @@ ifeq ($(CONFIG_MEDIA_CEC_EDID),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += cec-edid.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
 
 #
similarity index 70%
rename from drivers/staging/media/cec/Makefile
rename to drivers/media/cec/Makefile
index bd7f3c5934680bb349153f3319e13ea365137c68..d6686337275ff83a746c5e848e7040548d20775a 100644 (file)
@@ -1,5 +1,5 @@
 cec-objs := cec-core.o cec-adap.o cec-api.o
 
-ifeq ($(CONFIG_MEDIA_CEC),y)
+ifeq ($(CONFIG_MEDIA_CEC_SUPPORT),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += cec.o
 endif
index 2669b4bad9106853e269670dbecd5987f044e029..b31fa6fae009171a8edda132b224a52631a24b39 100644 (file)
@@ -221,7 +221,7 @@ config VIDEO_ADV7604
 
 config VIDEO_ADV7604_CEC
        bool "Enable Analog Devices ADV7604 CEC support"
-       depends on VIDEO_ADV7604 && MEDIA_CEC
+       depends on VIDEO_ADV7604 && MEDIA_CEC_SUPPORT
        ---help---
          When selected the adv7604 will support the optional
          HDMI CEC feature.
@@ -242,7 +242,7 @@ config VIDEO_ADV7842
 
 config VIDEO_ADV7842_CEC
        bool "Enable Analog Devices ADV7842 CEC support"
-       depends on VIDEO_ADV7842 && MEDIA_CEC
+       depends on VIDEO_ADV7842 && MEDIA_CEC_SUPPORT
        ---help---
          When selected the adv7842 will support the optional
          HDMI CEC feature.
@@ -481,7 +481,7 @@ config VIDEO_ADV7511
 
 config VIDEO_ADV7511_CEC
        bool "Enable Analog Devices ADV7511 CEC support"
-       depends on VIDEO_ADV7511 && MEDIA_CEC
+       depends on VIDEO_ADV7511 && MEDIA_CEC_SUPPORT
        ---help---
          When selected the adv7511 will support the optional
          HDMI CEC feature.
index 8e6918c5c87c5d1ebf8a28ec0e4fbb482170d48b..db0dd19d227acc313052c1620fe740eb4b02c6f5 100644 (file)
@@ -25,7 +25,7 @@ config VIDEO_VIVID
 
 config VIDEO_VIVID_CEC
        bool "Enable CEC emulation support"
-       depends on VIDEO_VIVID && MEDIA_CEC
+       depends on VIDEO_VIVID && MEDIA_CEC_SUPPORT
        ---help---
          When selected the vivid module will emulate the optional
          HDMI CEC feature.
index 6620d96ee44d2f851587dfa0a8db2f4b15bec881..0abe5ffb49346d3a29ff1a656c0e0c30b32c32a8 100644 (file)
@@ -21,8 +21,6 @@ if STAGING_MEDIA && MEDIA_SUPPORT
 # Please keep them in alphabetic order
 source "drivers/staging/media/bcm2048/Kconfig"
 
-source "drivers/staging/media/cec/Kconfig"
-
 source "drivers/staging/media/cxd2099/Kconfig"
 
 source "drivers/staging/media/davinci_vpfe/Kconfig"
index 906257e94dda894f4f6c9b208ac07548b8f2c04b..246299eff80dc347f00a0a41cf4cc03eb686c916 100644 (file)
@@ -1,5 +1,4 @@
 obj-$(CONFIG_I2C_BCM2048)      += bcm2048/
-obj-$(CONFIG_MEDIA_CEC)                += cec/
 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/
 obj-$(CONFIG_DVB_CXD2099)      += cxd2099/
 obj-$(CONFIG_LIRC_STAGING)     += lirc/
diff --git a/drivers/staging/media/cec/Kconfig b/drivers/staging/media/cec/Kconfig
deleted file mode 100644 (file)
index 6e12d41..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-config MEDIA_CEC
-       bool "CEC API (EXPERIMENTAL)"
-       depends on MEDIA_SUPPORT
-       select MEDIA_CEC_EDID
-       ---help---
-         Enable the CEC API.
-
-config MEDIA_CEC_DEBUG
-       bool "CEC debugfs interface (EXPERIMENTAL)"
-       depends on MEDIA_CEC && DEBUG_FS
-       ---help---
-         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 (file)
index 504d35c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-TODOs:
-
-- Once this is out of staging this should no longer be a separate
-  config option, instead it should be selected by drivers that want it.
-- Revisit the IS_REACHABLE(RC_CORE): perhaps the RC_CORE support should
-  be enabled through a separate config option in drivers/media/Kconfig
-  or rc/Kconfig?
-
-Hans Verkuil <hans.verkuil@cisco.com>
index c6aa2d1c9df0ad97c87c867b44a679b5d50378a6..6ffc407de62fbdde54e575aa5b589938f09fbfc9 100644 (file)
@@ -1,6 +1,6 @@
 config USB_PULSE8_CEC
        tristate "Pulse Eight HDMI CEC"
-       depends on USB_ACM && MEDIA_CEC
+       depends on USB_ACM && MEDIA_CEC_SUPPORT
        select SERIO
        select SERIO_SERPORT
        ---help---
index 0315fd7ad0f1bd3d900902eefb948bc2b8b603dc..ddfd955da0d40d48e830fe41395f1a2f37dae2e8 100644 (file)
@@ -1,6 +1,6 @@
 config VIDEO_SAMSUNG_S5P_CEC
        tristate "Samsung S5P CEC driver"
-       depends on VIDEO_DEV && MEDIA_CEC && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST)
+       depends on VIDEO_DEV && MEDIA_CEC_SUPPORT && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST)
        ---help---
          This is a driver for Samsung S5P HDMI CEC interface. It uses the
          generic CEC framework interface.
index 784d2c600aca100bd6bd17d6223db550ccb1219a..c04283db58d6d17b7917cbca1823ca627aa90868 100644 (file)
@@ -1,6 +1,6 @@
 config VIDEO_STI_HDMI_CEC
        tristate "STMicroelectronics STiH4xx HDMI CEC driver"
-       depends on VIDEO_DEV && MEDIA_CEC && (ARCH_STI || COMPILE_TEST)
+       depends on VIDEO_DEV && MEDIA_CEC_SUPPORT && (ARCH_STI || COMPILE_TEST)
        ---help---
          This is a driver for STIH4xx HDMI CEC interface. It uses the
          generic CEC framework interface.
index fdb5d600e4bb98a5c09c42aef4bed3715641f6fc..717eaf552f3d0c860615293bba7ee9dcb0f6a76b 100644 (file)
@@ -196,7 +196,7 @@ static inline bool cec_is_sink(const struct cec_adapter *adap)
        return adap->phys_addr == 0;
 }
 
-#if IS_ENABLED(CONFIG_MEDIA_CEC)
+#if IS_ENABLED(CONFIG_MEDIA_CEC_SUPPORT)
 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
                void *priv, const char *name, u32 caps, u8 available_las,
                struct device *parent);
index 6965d0909554573d723d9d7eca3bb205e12d2760..c49c448cff928a5b4c77ab00d720b386a16f1d9a 100644 (file)
@@ -82,6 +82,8 @@ header-y += capi.h
 header-y += cciss_defs.h
 header-y += cciss_ioctl.h
 header-y += cdrom.h
+header-y += cec.h
+header-y += cec-funcs.h
 header-y += cgroupstats.h
 header-y += chio.h
 header-y += cm4000_cs.h
similarity index 99%
rename from include/linux/cec-funcs.h
rename to include/uapi/linux/cec-funcs.h
index 138bbf721e70cae221544a4dbcd7a3f6175d54cd..1a1de2169f4891fd35c17c64d0f318bcaf34f162 100644 (file)
  * SOFTWARE.
  */
 
-/*
- * Note: this framework is still in staging and it is likely the API
- * will change before it goes out of staging.
- *
- * Once it is moved out of staging this header will move to uapi.
- */
 #ifndef _CEC_UAPI_FUNCS_H
 #define _CEC_UAPI_FUNCS_H
 
similarity index 99%
rename from include/linux/cec.h
rename to include/uapi/linux/cec.h
index 9c87711c0e1c0bb2d4a9b6f7ad417a7c593fd983..f4ec0af67707aa1b75ea9316fe788d7a985c34d0 100644 (file)
  * SOFTWARE.
  */
 
-/*
- * Note: this framework is still in staging and it is likely the API
- * will change before it goes out of staging.
- *
- * Once it is moved out of staging this header will move to uapi.
- */
 #ifndef _CEC_UAPI_H
 #define _CEC_UAPI_H