using wakelock in 4.9 kernel driver

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to port a touchscreen driver that was written in 2014 for a device running Android Q (Hikey 960 on AOSP). The module won't compile because of:
#include <linux/wakelock.h>
which isn't there in the Linaro 4.9 kernel that the Hikey 960 board uses with AOSP.
Apparently, the functionality is there in kernel/power/wakelock.c and kernel/power/power.h, but I don't know how to compile that into my module. Or if I'm still even supposed to make use of wakelocks in driver modules like this? There must be a good reason the wakelock.h is not there any longer?
kernel
migrated from unix.stackexchange.com Jul 5 at 14:52
This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.
add a comment |Â
up vote
0
down vote
favorite
I'm trying to port a touchscreen driver that was written in 2014 for a device running Android Q (Hikey 960 on AOSP). The module won't compile because of:
#include <linux/wakelock.h>
which isn't there in the Linaro 4.9 kernel that the Hikey 960 board uses with AOSP.
Apparently, the functionality is there in kernel/power/wakelock.c and kernel/power/power.h, but I don't know how to compile that into my module. Or if I'm still even supposed to make use of wakelocks in driver modules like this? There must be a good reason the wakelock.h is not there any longer?
kernel
migrated from unix.stackexchange.com Jul 5 at 14:52
This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to port a touchscreen driver that was written in 2014 for a device running Android Q (Hikey 960 on AOSP). The module won't compile because of:
#include <linux/wakelock.h>
which isn't there in the Linaro 4.9 kernel that the Hikey 960 board uses with AOSP.
Apparently, the functionality is there in kernel/power/wakelock.c and kernel/power/power.h, but I don't know how to compile that into my module. Or if I'm still even supposed to make use of wakelocks in driver modules like this? There must be a good reason the wakelock.h is not there any longer?
kernel
I'm trying to port a touchscreen driver that was written in 2014 for a device running Android Q (Hikey 960 on AOSP). The module won't compile because of:
#include <linux/wakelock.h>
which isn't there in the Linaro 4.9 kernel that the Hikey 960 board uses with AOSP.
Apparently, the functionality is there in kernel/power/wakelock.c and kernel/power/power.h, but I don't know how to compile that into my module. Or if I'm still even supposed to make use of wakelocks in driver modules like this? There must be a good reason the wakelock.h is not there any longer?
kernel
asked Jul 5 at 13:08
Genoil
365137
365137
migrated from unix.stackexchange.com Jul 5 at 14:52
This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.
migrated from unix.stackexchange.com Jul 5 at 14:52
This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/
add a comment |Â
up vote
0
down vote
Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/
Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/
answered Jul 6 at 7:32
Genoil
365137
365137
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51194363%2fusing-wakelock-in-4-9-kernel-driver%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password