public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org, Stephen Warren <swarren@nvidia.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: Re: [PATCH] pinctrl: baytrail: lock IRQs when starting them
Date: Tue, 3 Dec 2013 16:38:08 +0200	[thread overview]
Message-ID: <20131203143808.GQ2281@intel.com> (raw)
In-Reply-To: <1386080632-24402-1-git-send-email-linus.walleij@linaro.org>

On Tue, Dec 03, 2013 at 03:23:52PM +0100, Linus Walleij wrote:
> This uses the new API for tagging GPIO lines as in use by
> IRQs. This enforces a few semantic checks on how the underlying
> GPIO line is used.
> 
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> I have no idea how to compile and test this, please help,
> I have high confidence in the patch though.
> ---
>  drivers/pinctrl/pinctrl-baytrail.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
> index 1174ea86b6e9..7ad61c59f34a 100644
> --- a/drivers/pinctrl/pinctrl-baytrail.c
> +++ b/drivers/pinctrl/pinctrl-baytrail.c
> @@ -372,11 +372,33 @@ static void byt_irq_mask(struct irq_data *d)
>  {
>  }
>  
> +static unsigned int lp_irq_startup(struct irq_data *d)

This needs to be byt_irq_startup()..

> +{
> +	struct byt_gpio *vg = irq_data_get_irq_handler_data(d);
> +
> +	if (gpio_lock_as_irq(&vg->chip, irqd_to_hwirq(d)))
> +		dev_err(vg->chip.dev,
> +			"unable to lock HW IRQ %lu for IRQ\n",
> +			irqd_to_hwirq(d));
> +	byt_irq_unmask(d);
> +	return 0;
> +}
> +
> +static void lp_irq_shutdown(struct irq_data *d)
> +{
> +	struct byt_gpio *vg = irq_data_get_irq_handler_data(d);
> +
> +	byt_irq_mask(d);
> +	gpio_unlock_as_irq(&vg->chip, irqd_to_hwirq(d));
> +}
> +
>  static struct irq_chip byt_irqchip = {
>  	.name = "BYT-GPIO",
>  	.irq_mask = byt_irq_mask,
>  	.irq_unmask = byt_irq_unmask,
>  	.irq_set_type = byt_irq_type,
> +	.irq_startup = byt_irq_startup,

in order to this to compile :)

> +	.irq_shutdown = byt_irq_shutdown,
>  };
>  
>  static void byt_gpio_irq_init_hw(struct byt_gpio *vg)
> -- 
> 1.8.3.1

      reply	other threads:[~2013-12-03 14:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 14:23 [PATCH] pinctrl: baytrail: lock IRQs when starting them Linus Walleij
2013-12-03 14:38 ` Mika Westerberg [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=20131203143808.GQ2281@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=swarren@nvidia.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