On Wed, Jul 22, 2015 at 7:33 PM, Alban Bedel <albeu@xxxxxxx> 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 <albeu@xxxxxxx> > --- > > 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? Manuel -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html