Skip to content

Commit

Permalink
drivers: input: goodix_fod_lmi: fix fb notifier for goodix
Browse files Browse the repository at this point in the history
* The notifier was using a generic driver, switch it to use actual XiaoMi notifier.

Signed-off-by: Carlos Ayrton Lopez Arroyo <[email protected]>
  • Loading branch information
Official-Ayrton990 committed Dec 5, 2021
1 parent 848bebe commit 284f4e2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/input/fingerprint/goodix_fod_lmi/gf_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include <linux/pm_wakeup.h>
#include <drm/drm_bridge.h>
#ifndef GOODIX_DRM_INTERFACE_WA
#include <drm/drm_notifier.h>
#include <drm/drm_notifier_mi.h>
#endif

#include "gf_spi.h"
Expand Down Expand Up @@ -730,7 +730,7 @@ static int goodix_fb_state_chg_callback(struct notifier_block *nb,
unsigned int blank;
char temp[4] = { 0x0 };

if (val != DRM_EVENT_BLANK) {
if (val != MI_DRM_EVENT_BLANK) {
return 0;
}

Expand All @@ -739,11 +739,11 @@ static int goodix_fb_state_chg_callback(struct notifier_block *nb,
__func__, (int)val);
gf_dev = container_of(nb, struct gf_dev, notifier);

if (evdata && evdata->data && val == DRM_EVENT_BLANK && gf_dev) {
if (evdata && evdata->data && val == MI_DRM_EVENT_BLANK && gf_dev) {
blank = *(int *)(evdata->data);

switch (blank) {
case DRM_BLANK_POWERDOWN:
case MI_DRM_BLANK_POWERDOWN:
if (gf_dev->device_available == 1) {
gf_dev->fb_black = 1;
gf_dev->wait_finger_down = true;
Expand All @@ -760,7 +760,7 @@ static int goodix_fb_state_chg_callback(struct notifier_block *nb,
}
break;

case DRM_BLANK_UNBLANK:
case MI_DRM_BLANK_UNBLANK:
if (gf_dev->device_available == 1) {
gf_dev->fb_black = 0;
#if defined(GF_NETLINK_ENABLE)
Expand Down Expand Up @@ -891,7 +891,7 @@ static int gf_probe(struct platform_device *pdev)
#endif
#ifndef GOODIX_DRM_INTERFACE_WA
gf_dev->notifier = goodix_noti_block;
drm_register_client(&gf_dev->notifier);
mi_drm_register_client(&gf_dev->notifier);
#endif
gf_dev->irq = gf_irq_num(gf_dev);
fp_wakelock = wakeup_source_register(&gf_dev->spi->dev, "fp_wakelock");
Expand Down Expand Up @@ -955,7 +955,7 @@ static int gf_remove(struct platform_device *pdev)
gf_cleanup(gf_dev);
}
#ifndef GOODIX_DRM_INTERFACE_WA
drm_unregister_client(&gf_dev->notifier);
mi_drm_unregister_client(&gf_dev->notifier);
#endif
mutex_unlock(&device_list_lock);
return 0;
Expand Down

0 comments on commit 284f4e2

Please sign in to comment.