using wakelock in 4.9 kernel driver

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question











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.


















    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?







    share|improve this question











    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.
















      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?







      share|improve this question











      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?









      share|improve this question










      share|improve this question




      share|improve this question









      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.






















          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/






          share|improve this answer





















            Your Answer





            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            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






























            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/






            share|improve this answer

























              up vote
              0
              down vote













              Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/






              share|improve this answer























                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/






                share|improve this answer













                Found a solution myself, posting for future reference: https://www.linaro.org/blog/converting-code-implementing-suspend-blockers/







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jul 6 at 7:32









                Genoil

                365137




                365137






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)