Skip to content

Commit

Permalink
[REAPPLY/FIXUP] goodix: always return 1 for screen_state
Browse files Browse the repository at this point in the history
On some devices this worsens goodix performance due to userspace driver
decision.

Signed-off-by: Harish <[email protected]>
  • Loading branch information
RealJohnGalt authored and Codecity001 committed Apr 17, 2023
1 parent a5e4603 commit d5371c2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/input/fingerprint/goodix/gf_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ static ssize_t screen_state_get(struct device *device,
struct device_attribute *attribute,
char *buffer)
{
struct gf_dev *gfDev = dev_get_drvdata(device);
// struct gf_dev *gfDev = dev_get_drvdata(device);

return scnprintf(buffer, PAGE_SIZE, "%i\n", gfDev->screen_state);
return scnprintf(buffer, PAGE_SIZE, "%i\n", 1);
}

static inline ssize_t udfps_pressed_get(struct device *device,
Expand Down Expand Up @@ -839,9 +839,6 @@ static int __always_inline goodix_fb_state_chg_callback(
}
#endif
}
gf_dev->screen_state = 0;
sysfs_notify(&gf_dev->spi->dev.kobj,
NULL, dev_attr_screen_state.attr.name);
break;
case MSM_DRM_BLANK_UNBLANK:
if (gf_dev->device_available == 1) {
Expand All @@ -855,9 +852,6 @@ static int __always_inline goodix_fb_state_chg_callback(
SIGIO, POLL_IN);
#endif
}
gf_dev->screen_state = 1;
sysfs_notify(&gf_dev->spi->dev.kobj,
NULL, dev_attr_screen_state.attr.name);
break;
default:
pr_info("%s defalut\n", __func__);
Expand Down

0 comments on commit d5371c2

Please sign in to comment.