From 9ca8db23c6e6d33cef0f971006b514159085d672 Mon Sep 17 00:00:00 2001 From: Chris KIM Date: Wed, 3 Apr 2019 17:48:43 +0900 Subject: [PATCH] ODROID-N2 : HDMI-PHY suspend option added. Change-Id: I9f9c0a305bbddcdd238500b37bd70125a4b829fd --- .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index fea8cc5c5c83..b7dafb160adf 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -103,6 +103,21 @@ static const unsigned int hdmi_cable[] = { EXTCON_NONE, }; +#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND +static int suspend_hdmiphy = 1; + +static int __init suspend_hdmiphy_setup(char *s) +{ + if (!strcmp(s, "true") || !strcmp(s, "1")) + suspend_hdmiphy = 1; + else + suspend_hdmiphy = 0; + + return 0; +} +__setup("suspend_hdmiphy=", suspend_hdmiphy_setup); +#endif + struct extcon_dev *hdmitx_extcon_hdmi; struct extcon_dev *hdmitx_extcon_audio; struct extcon_dev *hdmitx_extcon_power; @@ -4559,7 +4574,8 @@ static int amhdmitx_probe(struct platform_device *pdev) ret = device_create_file(dev, &dev_attr_valid_mode); #ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND - register_early_suspend(&hdmitx_early_suspend_handler); + if (suspend_hdmiphy) + register_early_suspend(&hdmitx_early_suspend_handler); #endif hdmitx_device.nb.notifier_call = hdmitx_reboot_notifier; register_reboot_notifier(&hdmitx_device.nb);