From 3815ade25ad4f35acfa753535506005344d7c9d7 Mon Sep 17 00:00:00 2001 From: Sandor Yu Date: Tue, 17 Sep 2019 15:17:26 +0800 Subject: [PATCH] mxc: hdmi-cec: Add imx6 hdmi cec driver Add imx6 hdmi cec driver. This patch forwards imx6 hdmi cec driver from imx_4.19.y kernel. Signed-off-by: Sandor Yu --- drivers/mxc/Kconfig | 11 + drivers/mxc/Makefile | 1 + drivers/mxc/hdmi-cec/Kconfig | 11 + drivers/mxc/hdmi-cec/Makefile | 1 + drivers/mxc/hdmi-cec/mxc_hdmi-cec.c | 665 ++++++++++++++++++++++++++++ drivers/mxc/hdmi-cec/mxc_hdmi-cec.h | 38 ++ 6 files changed, 727 insertions(+) create mode 100644 drivers/mxc/Kconfig create mode 100644 drivers/mxc/Makefile create mode 100644 drivers/mxc/hdmi-cec/Kconfig create mode 100644 drivers/mxc/hdmi-cec/Makefile create mode 100644 drivers/mxc/hdmi-cec/mxc_hdmi-cec.c create mode 100644 drivers/mxc/hdmi-cec/mxc_hdmi-cec.h diff --git a/drivers/mxc/Kconfig b/drivers/mxc/Kconfig new file mode 100644 index 000000000000..0078a39ee0e6 --- /dev/null +++ b/drivers/mxc/Kconfig @@ -0,0 +1,11 @@ +# drivers/mxc/Kconfig + +if ARCH_MXC + +menu "MXC support drivers" + +source "drivers/mxc/hdmi-cec/Kconfig" + +endmenu + +endif diff --git a/drivers/mxc/Makefile b/drivers/mxc/Makefile new file mode 100644 index 000000000000..4bbd7fffa94d --- /dev/null +++ b/drivers/mxc/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MXC_HDMI_CEC) += hdmi-cec/ diff --git a/drivers/mxc/hdmi-cec/Kconfig b/drivers/mxc/hdmi-cec/Kconfig new file mode 100644 index 000000000000..c0be06854e27 --- /dev/null +++ b/drivers/mxc/hdmi-cec/Kconfig @@ -0,0 +1,11 @@ + +menu "MXC HDMI CEC (Consumer Electronics Control) support" + +config MXC_HDMI_CEC + tristate "Support for MXC HDMI CEC (Consumer Electronics Control)" + depends on MFD_MXC_HDMI + depends on FB_MXC_HDMI + help + The HDMI CEC device implement low level protocol on i.MX6x platforms. + +endmenu diff --git a/drivers/mxc/hdmi-cec/Makefile b/drivers/mxc/hdmi-cec/Makefile new file mode 100644 index 000000000000..07248b25b033 --- /dev/null +++ b/drivers/mxc/hdmi-cec/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MXC_HDMI_CEC) += mxc_hdmi-cec.o diff --git a/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c new file mode 100644 index 000000000000..75c01972e584 --- /dev/null +++ b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c @@ -0,0 +1,665 @@ +/* + * Copyright (C) 2012-2015 Freescale Semiconductor, Inc. All Rights Reserved. + */ + +/* + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/*! + * @file mxc_hdmi-cec.c + * + * @brief HDMI CEC system initialization and file operation implementation + * + * @ingroup HDMI + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include