drivers: Allow disabling OEM debug support

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Pranav Vashi 2018-12-13 23:59:39 +05:30 committed by codeworkx
parent 42535d6d10
commit aa79d2f01e
3 changed files with 9 additions and 3 deletions

View file

@ -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 */

View file

@ -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);

View file

@ -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