From bd9bea635c66f39103c7191e14ab73d2f6c13544 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Wed, 19 Aug 2020 17:11:37 -0700 Subject: [PATCH] soc: qcom: eud: Fix inconsistent nature of the cmdline The EUD driver's 'enable' command line argument is set to EUD_ENABLE_CMD even if the bootloader hasn't enabled it, which is not correct. Hence, update the 'enable' variable based on the state of the hardware. Change-Id: I1159436c0e9a803462f2154ccc05649d3f7b40da Signed-off-by: Raghavendra Rao Ananta --- drivers/soc/qcom/eud.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/soc/qcom/eud.c b/drivers/soc/qcom/eud.c index 6886698d6c20..f793266fe754 100644 --- a/drivers/soc/qcom/eud.c +++ b/drivers/soc/qcom/eud.c @@ -84,11 +84,7 @@ static const unsigned int eud_extcon_cable[] = { EXTCON_NONE, }; -/* - * On the kernel command line specify eud.enable=1 to enable EUD. - * EUD is disabled by default. - */ -static int enable = EUD_ENABLE_CMD; +static int enable = EUD_DISABLE_CMD; static bool eud_ready; static struct platform_device *eud_private; @@ -719,8 +715,10 @@ static int msm_eud_probe(struct platform_device *pdev) eud_ready = true; /* Proceed enable other EUD elements if bootloader has enabled it */ - if (enable && msm_eud_hw_is_enabled(pdev)) + if (msm_eud_hw_is_enabled(pdev)) { msm_eud_enable_irqs(chip); + enable = EUD_ENABLE_CMD; + } return 0;