一种过时的技术
按照网上早期的文章说,是有这么一个机制;但是在现在的Android O/P上的源码看,已经没有这个东西,仅剩下的是在input模块,也就是触摸屏这个模块有这样的字符存在。
使用宏CONFIG_HAS_EARLYSUSPEND 来控制
#if defined(CONFIG_FB) || defined(CONFIG_DRM)
struct notifier_block fb_notif;
#elif defined(CONFIG_HAS_EARLYSUSPEND)
struct early_suspend early_suspend;
#endif
而从out/target/product/k69v1_64/obj/KERNEL_OBJ/.config看,这个宏也是没有定义的,也就是说连touch也不会用了;
下面贴一张早期的机制框图
在早期,kernel社区拒绝wakelock机制,Android社区坚持wakelock机制,后来,kernel社区搞出了自己的一套wakelock机制,并且给Android提供了一些便利,这样Android使用kernel社区的wakelock机制重新实现了他的功能;其中sys/power/wake_lock wake_unlock 就是妥协的产物,可以供userspace空间的一些设备直接通过这个进行suspend。