Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752240AbbHCHNb (ORCPT ); Mon, 3 Aug 2015 03:13:31 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:36588 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbbHCHN2 (ORCPT ); Mon, 3 Aug 2015 03:13:28 -0400 MIME-Version: 1.0 In-Reply-To: <1438277338-7246-1-git-send-email-albeu@free.fr> References: <1438277338-7246-1-git-send-email-albeu@free.fr> Date: Mon, 3 Aug 2015 09:13:27 +0200 Message-ID: Subject: Re: [PATCH] MIPS: Remove all the uses of custom gpio.h From: Linus Walleij To: Alban Bedel Cc: Linux MIPS , Ralf Baechle , Hauke Mehrtens , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Bartlomiej Zolnierkiewicz , Tejun Heo , Alexandre Courbot , Dmitry Torokhov , Florian Fainelli , Manuel Lauss , Joe Perches , Daniel Walter , Sergey Ryazanov , Huacai Chen , Andrew Bresticker , James Hartley , Paul Burton , Bjorn Helgaas , Wolfram Sang , Simon Horman , Geert Uytterhoeven , Varka Bhadram , Masanari Iida , Tomi Valkeinen , Michael Buesch , Mauro Carvalho Chehab , abdoulaye berthe , "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: 2579 Lines: 64 On Thu, Jul 30, 2015 at 7:28 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 a handful really implement the GPIO API, most just forward > everythings to gpiolib. > > The Alchemy machine is notable as it provides a system to allow > implementing the GPIO API at the board level. But it is not used by > any board currently supported, so it can also be removed. > > For most machine types we can just remove the custom gpio.h, as well > as the custom wrappers if some exists. Some of the code found in > the wrappers must be moved to the respective GPIO driver. > > A few more fixes are need in some 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". > > It supercede my previous patch named: > "MIPS: Remove most of the custom gpio.h" > > Compared to the previous patch: > * Fixed gpio_to_irq on jz4740 and rb532 > * Cleaned up alchemy as well > * Removed asm/gpio.h > > 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. > > Now a few stats about the state of CONFIG_ARCH_HAVE_CUSTOM_GPIO_H > after appling this patch. Of the 31 supportd arch, 15 still have > asm/gpio.h, of these 9 are just a "#warning Include linux/gpio.h > instead of asm/gpio.h". So we have 6 arch left: arm, avr32, blackfin, > m68k, sh and unicore32. But only m68k and unicore32 really provides > custom wrappers, all the others only forward to gpiolib. > > On the drivers side we only have 13 occurences of '#include > ' left, mostly in drivers used on ARM SoC. > > So the work left to phase out the legacy GPIO is really not that much > anymore. Very good job being done here. Reviewed-by: Linus Walleij I guess this better go in through the MIPS tree. Given all the OpenWRT ports using MIPS this is excellent progress for a large hobbyist community. 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/