From: Hector Palacios <hector.palacios@digi.com>
To: Fabio Estevam <fabio.estevam@freescale.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Cc: "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"festevam@gmail.com" <festevam@gmail.com>,
"zonque@gmail.com" <zonque@gmail.com>,
"shawn.guo@linaro.org" <shawn.guo@linaro.org>
Subject: Re: mxs gpios as wakeup interrupts and irq_set_wake() hook
Date: Thu, 21 Nov 2013 18:32:04 +0100 [thread overview]
Message-ID: <528E4394.9050807@digi.com> (raw)
In-Reply-To: <528E364B.2070309@freescale.com>
Hi Fabio,
On 11/21/2013 05:35 PM, Fabio Estevam wrote:
> Hi Hector,
>
> On 11/21/2013 08:19 AM, Hector Palacios wrote:
>> Hello,
>>
>> I was trying to have GPIOs be able to wake up my ARM i.MX28 system from
>> suspend but noticed that the existing hook irq_set_wake() in the driver
>>
>> ct->chip.irq_set_wake = mxs_gpio_set_wake_irq;
>>
>> was never called when I enabled a gpio as wakeup via the sysfs:
>>
>> echo enabled > /sys/class/gpio/gpio107/device/power/wakeup
>
> Does the existing code work if you pass 'gpio-key,wakeup' in the .dts file?
Do you mean to have an entry like this?
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
gpio-key,wakeup;
button@21 {
label = "GPIO Key UP";
linux,code = <103>;
gpios = <&gpio3 11 1>; /* gpio107 */
};
};
No it doesn't.
In any case what I wanted (maybe it's not standard) was to be able to export a GPIO,
configure it as interrupt, and enable it as wakeup, entirely from sysfs, without
needing to use a driver or defining an entry for a specific GPIO in the DT.
I achieved it with the code I sent but I guess the framework was not devised to use
gpios that way.
Have you tested if that irq_set_wake hook in the gpio-mxs.c driver is ever called?
Best regards,
--
Hector Palacios
next prev parent reply other threads:[~2013-11-21 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 10:19 mxs gpios as wakeup interrupts and irq_set_wake() hook Hector Palacios
2013-11-21 16:35 ` Fabio Estevam
2013-11-21 17:32 ` Hector Palacios [this message]
2013-11-21 17:45 ` Fabio Estevam
2013-11-27 14:00 ` Linus Walleij
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=528E4394.9050807@digi.com \
--to=hector.palacios@digi.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=shawn.guo@linaro.org \
--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).