From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] gpio: mxs: implement get_direction callback Date: Mon, 17 Nov 2014 10:09:05 +0000 Message-ID: <20141117100905.GN4042@n2100.arm.linux.org.uk> References: <1416004026-9667-1-git-send-email-j.uzycki@elproma.com.pl> <20141117095909.GH27002@pengutronix.de> <1416218753.520525851@f237.i.mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:42688 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752286AbaKQKJ1 (ORCPT ); Mon, 17 Nov 2014 05:09:27 -0500 Content-Disposition: inline In-Reply-To: <1416218753.520525851@f237.i.mail.ru> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Alexander Shiyan Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , fabio.estevam@freescale.com, Alexandre Courbot , Richard Genoud , Greg Kroah-Hartman , Linus Walleij , "linux-gpio@vger.kernel.org" , Janusz =?utf-8?Q?U=C5=BCycki?= , "linux-serial@vger.kernel.org" , Fabio Estevam , "linux-arm-kernel@lists.infradead.org" On Mon, Nov 17, 2014 at 01:05:53PM +0300, Alexander Shiyan wrote: > Mon, 17 Nov 2014 10:59:09 +0100 =D0=BE=D1=82 Uwe Kleine-K=C3=B6nig : > > Hello Richard, > >=20 > > > >>>> So finally the prototypes would be: > > > >>>> int mctrl_gpio_request_irqs(struct mctrl_gpios*, struct > > > >>>> uart_port*, irqhandler_t); > > > >>>> void mctrl_gpio_free_irqs(struct mctrl_gpios*); > > > >> > > > >> I think: > > > >> > > > >> struct mctrl_gpios { > > > >> struct uart_port *port; > > > >> struct { > > > >> gpio_desc *gpio; > > > >> unsigned int irq; > > > I think it's just "int irq;" there > > irqs are unsigned. Some functions returning an irq use "int", but > > depending on who you ask this only for error reporting or a relict. > > Use 0 for invalid/unused in mctrl_gpio*. >=20 > afaik, IRQ 0 is valid irq number. No. IRQ0 is not a valid IRQ number, it's a historical mistake to think= it is (and it is something which needs correcting.) --=20 =46TTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html