diff --git a/drivers/input/fingerprint/goodix/gf_spi.c b/drivers/input/fingerprint/goodix/gf_spi.c index 0e37312d46ec..ebb3a8e9fdab 100644 --- a/drivers/input/fingerprint/goodix/gf_spi.c +++ b/drivers/input/fingerprint/goodix/gf_spi.c @@ -704,13 +704,16 @@ static int gf_probe(struct platform_device *pdev) status = gf_pinctrl_init(gf_dev); if (status) goto error_hw; +#ifdef OEM_DEBUG_SUPPORT if (get_boot_mode() != MSM_BOOT_MODE__FACTORY) { +#endif status = pinctrl_select_state(gf_dev->gf_pinctrl, gf_dev->gpio_state_enable); if (status) { pr_err("can not set %s pins\n", "fp_en_init"); goto error_hw; } +#ifdef OEM_DEBUG_SUPPORT } else { status = pinctrl_select_state(gf_dev->gf_pinctrl, gf_dev->gpio_state_disable); @@ -719,6 +722,7 @@ static int gf_probe(struct platform_device *pdev) goto error_hw; } } +#endif } if (status == 0) { /*input device subsystem */ diff --git a/drivers/input/misc/qpnp-power-on.c b/drivers/input/misc/qpnp-power-on.c index 721eeea0d9d6..2ab0ade0fd07 100644 --- a/drivers/input/misc/qpnp-power-on.c +++ b/drivers/input/misc/qpnp-power-on.c @@ -1033,8 +1033,10 @@ int qpnp_powerkey_state_check(struct qpnp_pon *pon,int up) { int rc =0; +#ifdef OEM_DEBUG_SUPPORT if (get_boot_mode() != MSM_BOOT_MODE__NORMAL) return 0; +#endif if ( up ) { rc = atomic_read(&pon->press_count); diff --git a/drivers/oneplus/Kconfig b/drivers/oneplus/Kconfig index 01e05385bde7..1704b13962ce 100644 --- a/drivers/oneplus/Kconfig +++ b/drivers/oneplus/Kconfig @@ -1,8 +1,8 @@ config OEM_DEBUG_SUPPORT - bool - default y + bool "OEM debug support" + default n config OEM_TRACE_SUPPORT - default y depends on OEM_DEBUG_SUPPORT bool "OEM debug function, enable it will register the device, which under /dev/otracer." + default y