Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbbGWIll (ORCPT ); Thu, 23 Jul 2015 04:41:41 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:51838 "EHLO smtp6-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbGWIlg (ORCPT ); Thu, 23 Jul 2015 04:41:36 -0400 X-Greylist: delayed 54364 seconds by postgrey-1.27 at vger.kernel.org; Thu, 23 Jul 2015 04:41:35 EDT Date: Thu, 23 Jul 2015 10:40:56 +0200 From: Alban To: Manuel Lauss Cc: Aban Bedel , Linux-MIPS , Ralf Baechle , Hauke Mehrtens , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Bartlomiej Zolnierkiewicz , Tejun Heo , Linus Walleij , 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 , LKML , linux-ide@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, "netdev@vger.kernel.org" Subject: Re: [PATCH] MIPS: Remove most of the custom gpio.h Message-ID: <20150723104056.3cb903d0@tock> In-Reply-To: References: <1437586416-14735-1-git-send-email-albeu@free.fr> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3165 Lines: 79 On Wed, 22 Jul 2015 19:47:18 +0200 Manuel Lauss wrote: > On Wed, Jul 22, 2015 at 7:33 PM, Alban Bedel wrote: > > Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS > > machines, and each machine type provides its own gpio.h. However > > only the Alchemy machine really use the feature, all other machines > > only use the default wrappers. > > > > For most machine types we can just remove the custom gpio.h, as well > > as the custom wrappers if some exists. A few more fixes are need in > > a few drivers as they rely on linux/gpio.h to provides some machine > > specific definitions, or used asm/gpio.h instead of linux/gpio.h for > > the gpio API. > > > > Signed-off-by: Alban Bedel > > --- > > > > This patch is based on my previous serie: > > "MIPS: ath79: Move the GPIO driver to drivers/gpio". > > > > For testing I tried to build all mips defconfig, however my > > toolchain couldn't handle a few configs: ip28 malta_qemu_32r6 > > maltasmvp_eva sead3micro. If somebody can test these that would be > > more than welcome. > > > > It might well be that some more drivers for MIPS devices that are > > not enabled in the defconfig will break because of this change, so > > more testing would be nice :) > > > > Regarding Alchemy I'm not sure what to do. It use a little more > > complex setup, quoting arch/mips/include/asm/mach-au1x00/gpio.h: > > > > /* Linux gpio framework integration. > > * > > * 4 use cases of Alchemy GPIOS: > > *(1) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=y: > > * Board must register gpiochips. > > *(2) GPIOLIB=y, ALCHEMY_GPIO_INDIRECT=n: > > * A gpiochip for the 75 GPIOs is registered. > > * > > *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: > > * the boards' gpio.h must provide the linux gpio wrapper > > functions, > > * > > *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: > > * inlinable gpio functions are provided which enable access > > to the > > * Au1300 gpios only by using the numbers straight out of the > > data- > > * sheets. > > > > * Cases 1 and 3 are intended for boards which want to provide their > > own > > * GPIO namespace and -operations (i.e. for example you have 8 GPIOs > > * which are in part provided by spare Au1300 GPIO pins and in part > > by > > * an external FPGA but you still want them to be accssible in linux > > * as gpio0-7. The board can of course use the alchemy_gpioX_* > > functions > > * as required). > > */ > > > > This sound to me like this is really not needed anymore. Is there > > any users of this left, or can it just go? > > There are no in-tree users of this, but a few out-of-tree ones (all > made by me) Does it have to be removed? Is it blocking anything? It is not blocking anything, but I see little gain in it. Cases 1 and 3 should nowadays be handled using normal GPIO drivers, and not with such platform specific constructs. Alban -- 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/