From c799511f3faa004922fba5168a787ee8a75511b0 Mon Sep 17 00:00:00 2001 From: Michal Koziel Date: Mon, 12 Apr 2021 08:35:57 +0200 Subject: [PATCH] pt: fb blanking configurable in devtree Add an optional device tree parameter parade,fb_blanking_disabled This parameter controls the blanking notifier. If the parameter is set in the device tree, the parade device will NOT change its state according to the state of the framebuffer device. --- drivers/input/touchscreen/pt_core.c | 4 +++- drivers/input/touchscreen/pt_devtree.c | 2 ++ include/linux/pt_core.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/pt_core.c b/drivers/input/touchscreen/pt_core.c index 6a8207f5a324..99539eefcb80 100755 --- a/drivers/input/touchscreen/pt_core.c +++ b/drivers/input/touchscreen/pt_core.c @@ -17127,7 +17127,9 @@ skip_enum: #ifdef CONFIG_HAS_EARLYSUSPEND pt_setup_early_suspend(cd); #elif defined(CONFIG_FB) - pt_setup_fb_notifier(cd); + if (!cd->cpdata->fb_blanking_disabled) { + pt_setup_fb_notifier(cd); + } #endif #ifdef NEED_SUSPEND_NOTIFIER diff --git a/drivers/input/touchscreen/pt_devtree.c b/drivers/input/touchscreen/pt_devtree.c index e4b11d6b3141..406013aa2069 100755 --- a/drivers/input/touchscreen/pt_devtree.c +++ b/drivers/input/touchscreen/pt_devtree.c @@ -834,6 +834,8 @@ static struct pt_core_platform_data *create_and_get_core_pdata( if (!rc) pdata->easy_wakeup_gesture = (u8)value; + pdata->fb_blanking_disabled = of_property_read_bool(core_node, "parade,fb_blanking_disabled"); + rc = of_property_read_u32(core_node, "parade,config_dut_generation", &value); if (!rc) diff --git a/include/linux/pt_core.h b/include/linux/pt_core.h index 1972f40e5d11..672b5c24b882 100755 --- a/include/linux/pt_core.h +++ b/include/linux/pt_core.h @@ -163,6 +163,7 @@ struct pt_core_platform_data { u8 config_dut_generation; u8 watchdog_force_stop; u8 panel_id_support; + bool fb_blanking_disabled; }; struct touch_framework {