drivers: Allow disabling OEM debug support
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
parent
42535d6d10
commit
aa79d2f01e
3 changed files with 9 additions and 3 deletions
|
@ -704,13 +704,16 @@ static int gf_probe(struct platform_device *pdev)
|
||||||
status = gf_pinctrl_init(gf_dev);
|
status = gf_pinctrl_init(gf_dev);
|
||||||
if (status)
|
if (status)
|
||||||
goto error_hw;
|
goto error_hw;
|
||||||
|
#ifdef OEM_DEBUG_SUPPORT
|
||||||
if (get_boot_mode() != MSM_BOOT_MODE__FACTORY) {
|
if (get_boot_mode() != MSM_BOOT_MODE__FACTORY) {
|
||||||
|
#endif
|
||||||
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
||||||
gf_dev->gpio_state_enable);
|
gf_dev->gpio_state_enable);
|
||||||
if (status) {
|
if (status) {
|
||||||
pr_err("can not set %s pins\n", "fp_en_init");
|
pr_err("can not set %s pins\n", "fp_en_init");
|
||||||
goto error_hw;
|
goto error_hw;
|
||||||
}
|
}
|
||||||
|
#ifdef OEM_DEBUG_SUPPORT
|
||||||
} else {
|
} else {
|
||||||
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
||||||
gf_dev->gpio_state_disable);
|
gf_dev->gpio_state_disable);
|
||||||
|
@ -719,6 +722,7 @@ static int gf_probe(struct platform_device *pdev)
|
||||||
goto error_hw;
|
goto error_hw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
/*input device subsystem */
|
/*input device subsystem */
|
||||||
|
|
|
@ -1033,8 +1033,10 @@ int qpnp_powerkey_state_check(struct qpnp_pon *pon,int up)
|
||||||
{
|
{
|
||||||
int rc =0;
|
int rc =0;
|
||||||
|
|
||||||
|
#ifdef OEM_DEBUG_SUPPORT
|
||||||
if (get_boot_mode() != MSM_BOOT_MODE__NORMAL)
|
if (get_boot_mode() != MSM_BOOT_MODE__NORMAL)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( up ) {
|
if ( up ) {
|
||||||
rc = atomic_read(&pon->press_count);
|
rc = atomic_read(&pon->press_count);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
config OEM_DEBUG_SUPPORT
|
config OEM_DEBUG_SUPPORT
|
||||||
bool
|
bool "OEM debug support"
|
||||||
default y
|
default n
|
||||||
|
|
||||||
config OEM_TRACE_SUPPORT
|
config OEM_TRACE_SUPPORT
|
||||||
default y
|
|
||||||
depends on OEM_DEBUG_SUPPORT
|
depends on OEM_DEBUG_SUPPORT
|
||||||
bool "OEM debug function, enable it will register the device, which under /dev/otracer."
|
bool "OEM debug function, enable it will register the device, which under /dev/otracer."
|
||||||
|
default y
|
||||||
|
|
Loading…
Add table
Reference in a new issue