From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ezequiel Garcia Subject: Re: [PATCH v3 04/15] watchdog: orion: Handle IRQ Date: Tue, 21 Jan 2014 11:35:59 -0300 Message-ID: <20140121143558.GA24923@localhost> References: <1390310774-20781-1-git-send-email-ezequiel.garcia@free-electrons.com> <1390310774-20781-5-git-send-email-ezequiel.garcia@free-electrons.com> <52DE84A6.6090909@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <52DE84A6.6090909-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Guenter Roeck Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wim Van Sebroeck , Gregory Clement , Lior Amsalem , Tawfik Bayouk , Thomas Petazzoni , Jason Cooper , Sebastian Hesselbarth , Jason Gunthorpe , Andrew Lunn , Daniel Lezcano , Fabio Estevam List-Id: devicetree@vger.kernel.org On Tue, Jan 21, 2014 at 06:31:02AM -0800, Guenter Roeck wrote: > On 01/21/2014 05:26 AM, Ezequiel Garcia wrote: > > DT-enabled where an irqchip driver for the brigde interrupt control= ler is > > available can handle the watchdog IRQ properly. Therefore, we reque= st > > the interruption and add a dummy handler that merely calls panic(). > > > > This is done in order to have an initial 'ack' of the interruption, > > which clears the watchdog state. > > > > Furthermore, since some platforms don't have such IRQ, this commit > > makes the interruption specification optional. > > > > Signed-off-by: Ezequiel Garcia > > --- > > .../devicetree/bindings/watchdog/marvel.txt | 2 ++ > > drivers/watchdog/orion_wdt.c | 22 +++++++++= ++++++++++++- > > 2 files changed, 23 insertions(+), 1 deletion(-) > > >=20 > [ ... ] >=20 > > static int orion_wdt_probe(struct platform_device *pdev) > > { > > struct resource *res; > > - int ret; > > + int ret, irq; > > > > clk =3D devm_clk_get(&pdev->dev, NULL); > > if (IS_ERR(clk)) { > > @@ -131,6 +138,19 @@ static int orion_wdt_probe(struct platform_dev= ice *pdev) > > if (!wdt_reg) > > return -ENOMEM; > > > > + irq =3D platform_get_irq(pdev, 0); > > + if (irq > 0) { >=20 > 0 is a valid interrupt number, and platform_get_irq returns an error = code on errors. > Should be >=3D 0. >=20 Yes, indeed. I'll wait to see if there's any other feedback and then se= nd a v4. Thanks a lot! --=20 Ezequiel Garc=C3=ADa, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html