From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754107Ab3LCObj (ORCPT ); Tue, 3 Dec 2013 09:31:39 -0500 Received: from mga01.intel.com ([192.55.52.88]:55445 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753464Ab3LCObf (ORCPT ); Tue, 3 Dec 2013 09:31:35 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,818,1378882800"; d="scan'208";a="443842661" Date: Tue, 3 Dec 2013 16:38:08 +0200 From: Mika Westerberg To: Linus Walleij Cc: linux-kernel@vger.kernel.org, Stephen Warren , Andy Shevchenko , Mathias Nyman Subject: Re: [PATCH] pinctrl: baytrail: lock IRQs when starting them Message-ID: <20131203143808.GQ2281@intel.com> References: <1386080632-24402-1-git-send-email-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1386080632-24402-1-git-send-email-linus.walleij@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > Cc: Mika Westerberg > Cc: Mathias Nyman > Signed-off-by: Linus Walleij > --- > 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