Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753440AbbG0NUL (ORCPT ); Mon, 27 Jul 2015 09:20:11 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:36302 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344AbbG0NUJ (ORCPT ); Mon, 27 Jul 2015 09:20:09 -0400 MIME-Version: 1.0 In-Reply-To: <55B131B1.10302@metafoo.de> References: <1437586416-14735-1-git-send-email-albeu@free.fr> <55B131B1.10302@metafoo.de> Date: Mon, 27 Jul 2015 15:20:08 +0200 Message-ID: Subject: Re: [PATCH] MIPS: Remove most of the custom gpio.h From: Linus Walleij To: Lars-Peter Clausen Cc: Alban Bedel , Linux MIPS , Ralf Baechle , Hauke Mehrtens , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Bartlomiej Zolnierkiewicz , Tejun Heo , Alexandre Courbot , Dmitry Torokhov , Florian Fainelli , Joe Perches , Daniel Walter , Sergey Ryazanov , Huacai Chen , Andrew Bresticker , James Hartley , Paul Burton , Waldemar Brodkorb , James Hogan , Tomi Valkeinen , Levente Kurusa , abdoulaye berthe , Wolfram Sang , "linux-kernel@vger.kernel.org" , linux-ide@vger.kernel.org, "linux-gpio@vger.kernel.org" , Linux Input , "netdev@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1374 Lines: 40 On Thu, Jul 23, 2015 at 8:25 PM, Lars-Peter Clausen wrote: > On 07/22/2015 07:33 PM, Alban Bedel wrote: >> >> diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c >> index 54c80d4..3dc500c 100644 >> --- a/arch/mips/jz4740/gpio.c >> +++ b/arch/mips/jz4740/gpio.c >> @@ -262,18 +262,6 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t >> mask) >> } >> EXPORT_SYMBOL(jz_gpio_port_get_value); >> >> -int gpio_to_irq(unsigned gpio) >> -{ >> - return JZ4740_IRQ_GPIO(0) + gpio; >> -} >> -EXPORT_SYMBOL_GPL(gpio_to_irq); > > > This need to be hooked up the gpio_to_irq() callback of the gpio_chip struct > of this driver rather than completely removing it. Otherwise this > functionality will be broken. > > Similar for other platforms which implement the function. Even better is to see if we can convert the driver to GPIOLIB_IRQCHIP which moves the handling of IRQ mapping to the gpiolib core. This works for all simple cascading GPIO-with-IRQ controllers with a local mask register. (Not when the system intcon and GPIO is mashed up though.) But no hurry with that. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/