From: Lucas Stach <l.stach@pengutronix.de>
To: Stefan Agner <stefan@agner.ch>
Cc: shawn.guo@freescale.com, kernel@pengutronix.de,
linus.walleij@linaro.org, gnurou@gmail.com,
linux@arm.linux.org.uk, jingchang.lu@freescale.com,
b20788@freescale.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 5/9] gpio: vf610: Extend with wakeup support
Date: Wed, 24 Sep 2014 12:06:19 +0200 [thread overview]
Message-ID: <1411553179.2735.4.camel@pengutronix.de> (raw)
In-Reply-To: <704b6bb97147b3d0ee1557b43d85ab9376c28666.1411404079.git.stefan@agner.ch>
Hi Stefan,
Am Montag, den 22.09.2014, 19:09 +0200 schrieb Stefan Agner:
> Support Vybrid GPIO's as wakeup source by requesting the parent
> IRQ as wakeup IRQ.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> drivers/gpio/gpio-vf610.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
> index 5f59424..50326af 100644
> --- a/drivers/gpio/gpio-vf610.c
> +++ b/drivers/gpio/gpio-vf610.c
> @@ -196,12 +196,28 @@ static void vf610_gpio_irq_unmask(struct irq_data *d)
> pcr_base);
> }
>
> +static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
> +{
> + struct vf610_gpio_port *port = irq_data_get_irq_chip_data(d);
> +
> + if (enable)
> + enable_irq_wake(port->irq);
> + else
> + disable_irq_wake(port->irq);
> +
> + return 0;
> +}
> +
> +
> static struct irq_chip vf610_gpio_irq_chip = {
> .name = "gpio-vf610",
> .irq_ack = vf610_gpio_irq_ack,
> .irq_mask = vf610_gpio_irq_mask,
> .irq_unmask = vf610_gpio_irq_unmask,
> .irq_set_type = vf610_gpio_irq_set_type,
> +#ifdef CONFIG_PM_SLEEP
> + .irq_set_wake = vf610_gpio_irq_set_wake,
> +#endif
Either you need to get rid of this #ifdef and always assign this
function or you need to wrap the function itself into the same #ifdef.
Otherwise you provoke a unused function warning with !CONFIG_PM_SLEEP.
Given that this function isn't really that big I would argue to just
drop the #ifdef.
Regards,
Lucas
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2014-09-24 10:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 17:09 [PATCH 0/9] ARM: vf610: Suspend/resume support Stefan Agner
2014-09-22 17:09 ` [PATCH 1/9] ARM: dts: vf610: Add system reset controller (SRC) Stefan Agner
2014-09-24 9:16 ` Linus Walleij
2014-09-24 16:41 ` Stefan Agner
2014-09-25 13:08 ` Philipp Zabel
2014-09-22 17:09 ` [PATCH 2/9] ARM: dts: vf610: add global power controller (GPC) Stefan Agner
2014-09-22 17:09 ` [PATCH 3/9] ARM: dts: vf610: add on-chip SRAM Stefan Agner
2014-09-22 17:09 ` [PATCH 4/9] ARM: dts: vf610-colibri: GPIO power key Stefan Agner
2014-09-22 17:09 ` [PATCH 5/9] gpio: vf610: Extend with wakeup support Stefan Agner
2014-09-24 9:19 ` Linus Walleij
2014-09-24 16:33 ` Stefan Agner
2014-09-24 10:06 ` Lucas Stach [this message]
2014-09-24 16:51 ` Stefan Agner
2014-09-22 17:09 ` [PATCH 6/9] ARM: imx: gpc: Support vf610 global power controller Stefan Agner
2014-09-22 17:09 ` [PATCH 7/9] ARM: imx: src: Support vf610 system reset controller Stefan Agner
2014-09-22 17:09 ` [PATCH 8/9] ARM: imx: clk-gate2: allow custom gate configuration Stefan Agner
2014-09-28 2:02 ` Shawn Guo
2014-09-22 17:09 ` [PATCH 9/9] ARM: vf610: initial suspend/resume support Stefan Agner
2014-09-28 3:15 ` [PATCH 0/9] ARM: vf610: Suspend/resume support Shawn Guo
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=1411553179.2735.4.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=b20788@freescale.com \
--cc=gnurou@gmail.com \
--cc=jingchang.lu@freescale.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=shawn.guo@freescale.com \
--cc=stefan@agner.ch \
/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).