Skip to content

Commit

Permalink
[media] cec: move the CEC framework out of staging and to media
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and mchehab committed Nov 16, 2016
1 parent a69a168 commit 0dbaceb
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Documentation/media/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions drivers/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions drivers/media/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

#
Expand Down
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/vivid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/Makefile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
12 changes: 0 additions & 12 deletions drivers/staging/media/cec/Kconfig

This file was deleted.

9 changes: 0 additions & 9 deletions drivers/staging/media/cec/TODO

This file was deleted.

2 changes: 1 addition & 1 deletion drivers/staging/media/pulse8-cec/Kconfig
Original file line number Diff line number Diff line change
@@ -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---
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/s5p-cec/Kconfig
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/st-cec/Kconfig
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/media/cec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions include/uapi/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions include/linux/cec-funcs.h → include/uapi/linux/cec-funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
* 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

Expand Down
6 changes: 0 additions & 6 deletions include/linux/cec.h → include/uapi/linux/cec.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
* 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

Expand Down

0 comments on commit 0dbaceb

Please sign in to comment.