public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Wang Dongsheng <dongsheng.wang@freescale•com>
Cc: linuxppc-dev@lists•ozlabs.org,
	Wang Dongsheng <dongsheng.wang@freescale•com>
Subject: Re: [PATCH v2 1/4] powerpc/mpic: add irq_set_wake support
Date: Tue, 2 Apr 2013 19:36:56 -0500	[thread overview]
Message-ID: <1364949416.24520.30@snotra> (raw)
In-Reply-To: <1364884840-28635-1-git-send-email-dongsheng.wang@freescale.com> (from dongsheng.wang@freescale.com on Tue Apr  2 01:40:37 2013)

On 04/02/2013 01:40:37 AM, Wang Dongsheng wrote:
> Add irq_set_wake support. Just add IRQF_NO_SUSPEND to =20
> desc->action->flag.
> So the wake up interrupt will not be disable in suspend_device_irqs.
>=20
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale•com>
> ---
> v2:
> * Add: Check freescale chip in mpic_irq_set_wake().
> * Remove: Support mpic_irq_set_wake() in ht_chip.
>=20
>  arch/powerpc/sysdev/mpic.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>=20
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 3b2efd4..50d1ee1 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -920,6 +920,22 @@ int mpic_set_irq_type(struct irq_data *d, =20
> unsigned int flow_type)
>  	return IRQ_SET_MASK_OK_NOCOPY;
>  }
>=20
> +static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
> +{
> +	struct irq_desc *desc =3D container_of(d, struct irq_desc, =20
> irq_data);
> +	struct mpic *mpic =3D mpic_from_irq_data(d);
> +
> +	if (!(mpic->flags & MPIC_FSL))
> +		return -EINVAL;

I was thinking more along the lines of using MPIC_FSL during init to =20
decide whether to write this function to .irq_set_wake, though that =20
could probably wait until there's a second type of MPIC that needs this =20
(if ever).

-Scott=

  parent reply	other threads:[~2013-04-03  0:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  6:40 [PATCH v2 1/4] powerpc/mpic: add irq_set_wake support Wang Dongsheng
2013-04-02  6:40 ` [PATCH v2 2/4] powerpc/mpic: add global timer support Wang Dongsheng
2013-04-02  6:40 ` [PATCH v2 3/4] powerpc/mpic: create mpic subsystem object Wang Dongsheng
2013-04-02  6:40 ` [PATCH v2 4/4] powerpc/fsl: add MPIC timer wakeup support Wang Dongsheng
2013-04-03  0:36 ` Scott Wood [this message]
2013-04-03  2:49   ` [PATCH v2 1/4] powerpc/mpic: add irq_set_wake support Wang Dongsheng-B40534
2013-04-07  3:40   ` Wang Dongsheng-B40534

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=1364949416.24520.30@snotra \
    --to=scottwood@freescale$(echo .)com \
    --cc=dongsheng.wang@freescale$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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