kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Pintu Agarwal <pintu.ping@gmail.com>
To: Kernelnewbies <kernelnewbies@kernelnewbies.org>,
	 open list <linux-kernel@vger.kernel.org>,
	linux-pm@vger.kernel.org,
	 "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	linux-gpio@vger.kernel.org,  zonque@gmail.com,
	sergiosiena@gmail.com
Subject: Re: Generic way for verifying GPIO wakeup capability
Date: Wed, 10 Jun 2020 23:28:47 +0530	[thread overview]
Message-ID: <CAOuPNLhQFegohvCx3dD-CtDdYrTSfGrJ1M3ps_YLn4j29x5pFw@mail.gmail.com> (raw)
In-Reply-To: <CAOuPNLj4m_jvs90YpAq5r4gAP9o8Y1Uck3HN+MbsTPb3zP=4eA@mail.gmail.com>

On Tue, 9 Jun 2020 at 23:06, Pintu Agarwal <pintu.ping@gmail.com> wrote:
>
> Hi All,
>
> I am looking for ways to wakeup any devices (from sleep) using any
> arbitrary gpio wakeup method in a generic way (either from user space
> or kernel space) that should work on any kernel version (starting from
> 4.14 onwards).
>
> What are the options available right now ?
> I wanted to experiment with all of them and decide which is best for us.
>
> Is /sys/class/gpio/ method still valid with the latest kernel ?
> Or is there any other method to do it from user space ?
>
> One option I know is to use enable/disable_irq_wake() API from kernel
> driver suspend/resume path.
> Just like this:
> https://lwn.net/Articles/569027/
>
> But this requires an additional kernel driver and device-tree changes
> for each gpio wakeup, which the end-user needs to implement on their
> own.
>
> Is there any other existing generic mechanism?
>

https://embeddedbits.org/new-linux-kernel-gpio-user-space-interface/

Is it possible to achieve this using this new interface ?

And I think another option is to use gpio-keys defined in device-tree.
Will this method work for any wake-capable gpio ?
How to verify this for any arbitrary gpio ?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-06-10 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 17:36 Generic way for verifying GPIO wakeup capability Pintu Agarwal
2020-06-10 17:58 ` Pintu Agarwal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOuPNLhQFegohvCx3dD-CtDdYrTSfGrJ1M3ps_YLn4j29x5pFw@mail.gmail.com \
    --to=pintu.ping@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sergiosiena@gmail.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).