Skip to content

Commit

Permalink
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux
Browse files Browse the repository at this point in the history
Pull removal of GENERIC_GPIO from Grant Likely:
 "GENERIC_GPIO now synonymous with GPIOLIB.  There are no longer any
  valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
  is possible to do so which has been causing confusion and breakage.
  This branch does the work to completely eliminate GENERIC_GPIO."

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
  gpio: update gpio Chinese documentation
  Remove GENERIC_GPIO config option
  Convert selectors of GENERIC_GPIO to GPIOLIB
  blackfin: force use of gpiolib
  m68k: coldfire: use gpiolib
  mips: pnx833x: remove requirement for GENERIC_GPIO
  openrisc: default GENERIC_GPIO to false
  avr32: default GENERIC_GPIO to false
  xtensa: remove explicit selection of GENERIC_GPIO
  sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
  powerpc: remove redundant GENERIC_GPIO selection
  unicore32: default GENERIC_GPIO to false
  unicore32: remove unneeded select GENERIC_GPIO
  arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
  arm: remove redundant GENERIC_GPIO selection
  mips: alchemy: require gpiolib
  mips: txx9: change GENERIC_GPIO to GPIOLIB
  mips: loongson: use GPIO driver on CONFIG_GPIOLIB
  mips: remove redundant GENERIC_GPIO select
  • Loading branch information
torvalds committed May 9, 2013
2 parents 1763e73 + f4c5405 commit 5647ac0
Show file tree
Hide file tree
Showing 64 changed files with 76 additions and 155 deletions.
10 changes: 5 additions & 5 deletions Documentation/gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ in this document, but drivers acting as clients to the GPIO interface must
not care how it's implemented.)

That said, if the convention is supported on their platform, drivers should
use it when possible. Platforms must declare GENERIC_GPIO support in their
Kconfig (boolean true), and provide an <asm/gpio.h> file. Drivers that can't
work without standard GPIO calls should have Kconfig entries which depend
on GENERIC_GPIO. The GPIO calls are available, either as "real code" or as
optimized-away stubs, when drivers use the include file:
use it when possible. Platforms must select ARCH_REQUIRE_GPIOLIB or
ARCH_WANT_OPTIONAL_GPIOLIB in their Kconfig. Drivers that can't work without
standard GPIO calls should have Kconfig entries which depend on GPIOLIB. The
GPIO calls are available, either as "real code" or as optimized-away stubs,
when drivers use the include file:

#include <linux/gpio.h>

Expand Down
8 changes: 4 additions & 4 deletions Documentation/zh_CN/gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ GPIO 公约
控制器的抽象函数来实现它。(有一些可选的代码能支持这种策略的实现,本文档
后面会介绍,但作为 GPIO 接口的客户端驱动程序必须与它的实现无关。)

也就是说,如果在他们的平台上支持这个公约,驱动应尽可能的使用它。平台
必须在 Kconfig 中声明对 GENERIC_GPIO的支持 (布尔型 true),并提供
一个 <asm/gpio.h> 文件。那些调用标准 GPIO 函数的驱动应该在 Kconfig
入口中声明依赖GENERIC_GPIO。当驱动包含文件:
也就是说,如果在他们的平台上支持这个公约,驱动应尽可能的使用它。同时,平台
必须在 Kconfig 中选择 ARCH_REQUIRE_GPIOLIB 或者 ARCH_WANT_OPTIONAL_GPIOLIB
选项。那些调用标准 GPIO 函数的驱动应该在 Kconfig 入口中声明依赖GENERIC_GPIO。
当驱动包含文件:

#include <linux/gpio.h>

Expand Down
3 changes: 0 additions & 3 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_GPIO
bool

config ZONE_DMA
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ config MIGHT_HAVE_PCI
config SYS_SUPPORTS_APM_EMULATION
bool

config GENERIC_GPIO
bool

config HAVE_TCM
bool
select GENERIC_ALLOCATOR
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-orion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include

orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o
orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y)
2 changes: 1 addition & 1 deletion arch/arm/plat-orion/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ orion_gpio_is_valid(struct orion_gpio_chip *ochip, unsigned pin, int mode)
}

/*
* GENERIC_GPIO primitives.
* GPIO primitives.
*/
static int orion_gpio_request(struct gpio_chip *chip, unsigned pin)
{
Expand Down
3 changes: 0 additions & 3 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ config SWIOTLB
config IOMMU_HELPER
def_bool SWIOTLB

config GENERIC_GPIO
bool

source "init/Kconfig"

source "kernel/Kconfig.freezer"
Expand Down
3 changes: 0 additions & 3 deletions arch/avr32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ config AVR32
There is an AVR32 Linux project with a web page at
http://avr32linux.org/.

config GENERIC_GPIO
def_bool y

config STACKTRACE_SUPPORT
def_bool y

Expand Down
5 changes: 1 addition & 4 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ config BLACKFIN
select HAVE_OPROFILE
select HAVE_PERF_EVENTS
select ARCH_HAVE_CUSTOM_GPIO_H
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select HAVE_UID16
select HAVE_UNDERSCORE_SYMBOL_PREFIX
select VIRT_TO_BUS
Expand All @@ -52,9 +52,6 @@ config GENERIC_BUG
config ZONE_DMA
def_bool y

config GENERIC_GPIO
def_bool y

config FORCE_MAX_ZONEORDER
int
default "14"
Expand Down
3 changes: 0 additions & 3 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ source "mm/Kconfig"

source "kernel/Kconfig.hz"

config GENERIC_GPIO
def_bool n

endmenu

source "init/Kconfig"
Expand Down
3 changes: 0 additions & 3 deletions arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ config GENERIC_CALIBRATE_DELAY
config HAVE_SETUP_PER_CPU_AREA
def_bool y

config GENERIC_GPIO
bool

config DMI
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ config ARCH_HAS_ILOG2_U32
config ARCH_HAS_ILOG2_U64
bool

config GENERIC_GPIO
bool

config GENERIC_HWEIGHT
bool
default y
Expand Down
3 changes: 1 addition & 2 deletions arch/m68k/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ config M68KCLASSIC

config COLDFIRE
bool "Coldfire CPU family support"
select GENERIC_GPIO
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select ARCH_HAVE_CUSTOM_GPIO_H
select CPU_HAS_NO_BITFIELDS
select CPU_HAS_NO_MULDIV64
Expand Down
3 changes: 0 additions & 3 deletions arch/metag/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ config GENERIC_HWEIGHT
config GENERIC_CALIBRATE_DELAY
def_bool y

config GENERIC_GPIO
def_bool n

config NO_IOPORT
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ config GENERIC_HWEIGHT
config GENERIC_CALIBRATE_DELAY
def_bool y

config GENERIC_GPIO
bool

config GENERIC_CSUM
def_bool y

Expand Down
10 changes: 1 addition & 9 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ config MIPS_ALCHEMY
select SYS_HAS_CPU_MIPS32_R1
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_APM_EMULATION
select GENERIC_GPIO
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select SYS_SUPPORTS_ZBOOT
select USB_ARCH_HAS_OHCI
select USB_ARCH_HAS_EHCI
Expand Down Expand Up @@ -225,7 +224,6 @@ config MACH_JZ4740
select SYS_SUPPORTS_ZBOOT_UART16550
select DMA_NONCOHERENT
select IRQ_CPU
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select SYS_HAS_EARLY_PRINTK
select HAVE_PWM
Expand Down Expand Up @@ -937,7 +935,6 @@ config CSRC_SB1250
bool

config GPIO_TXX9
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
bool

Expand Down Expand Up @@ -1009,9 +1006,6 @@ config GENERIC_ISA_DMA_SUPPORT_BROKEN
config ISA_DMA_API
bool

config GENERIC_GPIO
bool

config HOLES_IN_ZONE
bool

Expand Down Expand Up @@ -1112,7 +1106,6 @@ config SOC_PNX833X
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_BIG_ENDIAN
select GENERIC_GPIO
select CPU_MIPSR2_IRQ_VI

config SOC_PNX8335
Expand Down Expand Up @@ -1203,7 +1196,6 @@ config CPU_LOONGSON2F
bool "Loongson 2F"
depends on SYS_HAS_CPU_LOONGSON2F
select CPU_LOONGSON2
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
help
The Loongson 2F processor implements the MIPS III instruction set
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/loongson/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
pci.o bonito-irq.o mem.o machtype.o platform.o
obj-$(CONFIG_GENERIC_GPIO) += gpio.o
obj-$(CONFIG_GPIOLIB) += gpio.o

#
# Serial port support
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/txx9/generic/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ EXPORT_SYMBOL(clk_put);

/* GPIO support */

#ifdef CONFIG_GENERIC_GPIO
#ifdef CONFIG_GPIOLIB
int gpio_to_irq(unsigned gpio)
{
return -EINVAL;
Expand Down
3 changes: 0 additions & 3 deletions arch/openrisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ config GENERIC_HWEIGHT
config NO_IOPORT
def_bool y

config GENERIC_GPIO
def_bool y

config TRACE_IRQFLAGS_SUPPORT
def_bool y

Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ config GENERIC_HWEIGHT
bool
default y

config GENERIC_GPIO
bool
help
Generic GPIO API support

config PPC
bool
default y
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/40x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ config PPC4xx_GPIO
bool "PPC4xx GPIO support"
depends on 40x
select ARCH_REQUIRE_GPIOLIB
select GENERIC_GPIO
help
Enable gpiolib support for ppc40x based boards

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/44x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ config PPC4xx_GPIO
bool "PPC4xx GPIO support"
depends on 44x
select ARCH_REQUIRE_GPIOLIB
select GENERIC_GPIO
help
Enable gpiolib support for ppc440 based boards

Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/85xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ config GE_IMP3A
select DEFAULT_UIMAGE
select SWIOTLB
select MMIO_NVRAM
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select GE_FPGA
help
Expand Down Expand Up @@ -328,7 +327,7 @@ config B4_QDS
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
select GENERIC_GPIO
select GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/platforms/86xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ config GEF_PPC9A
bool "GE PPC9A"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select GE_FPGA
help
Expand All @@ -47,7 +46,6 @@ config GEF_SBC310
bool "GE SBC310"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select GE_FPGA
help
Expand All @@ -57,7 +55,6 @@ config GEF_SBC610
bool "GE SBC610"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
select GE_FPGA
select HAS_RAPIDIO
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/8xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ config 8xx_COPYBACK

config 8xx_GPIO
bool "GPIO API Support"
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
help
Saying Y here will cause the ports on an MPC8xx processor to be used
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/platforms/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ config QUICC_ENGINE
config QE_GPIO
bool "QE GPIO support"
depends on QUICC_ENGINE
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
help
Say Y here if you're going to use hardware that connects to the
Expand All @@ -315,7 +314,6 @@ config CPM2
select PPC_LIB_RHEAP
select PPC_PCI_CHOICE
select ARCH_REQUIRE_GPIOLIB
select GENERIC_GPIO
help
The CPM2 (Communications Processor Module) is a coprocessor on
embedded CPUs made by Freescale. Selecting this option means that
Expand Down Expand Up @@ -353,7 +351,6 @@ config OF_RTC
config SIMPLE_GPIO
bool "Support for simple, memory-mapped GPIO controllers"
depends on PPC
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
help
Say Y here to support simple, memory-mapped GPIO controllers.
Expand All @@ -364,7 +361,6 @@ config SIMPLE_GPIO
config MCU_MPC8349EMITX
bool "MPC8349E-mITX MCU driver"
depends on I2C=y && PPC_83xx
select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB
help
Say Y here to enable soft power-off functionality on the Freescale
Expand Down
3 changes: 0 additions & 3 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ config GENERIC_CSUM
config GENERIC_HWEIGHT
def_bool y

config GENERIC_GPIO
def_bool n

config GENERIC_CALIBRATE_DELAY
bool

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-sdk7786/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obj-y := fpga.o irq.o nmi.o setup.o

obj-$(CONFIG_GENERIC_GPIO) += gpio.o
obj-$(CONFIG_GPIOLIB) += gpio.o
obj-$(CONFIG_HAVE_SRAM_POOL) += sram.o
2 changes: 1 addition & 1 deletion arch/sh/boards/mach-x3proto/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-y += setup.o ilsel.o

obj-$(CONFIG_GENERIC_GPIO) += gpio.o
obj-$(CONFIG_GPIOLIB) += gpio.o
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh2a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SH7203) := pinmux-sh7203.o
pinmux-$(CONFIG_CPU_SUBTYPE_SH7264) := pinmux-sh7264.o
pinmux-$(CONFIG_CPU_SUBTYPE_SH7269) := pinmux-sh7269.o

obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7712) := clock-sh7712.o
pinmux-$(CONFIG_CPU_SUBTYPE_SH7720) := pinmux-sh7720.o

obj-y += $(clock-y)
obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh4a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SHX3) := pinmux-shx3.o

obj-y += $(clock-y)
obj-$(CONFIG_SMP) += $(smp-y)
obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
obj-$(CONFIG_PERF_EVENTS) += perf_event.o
obj-$(CONFIG_HAVE_HW_BREAKPOINT) += ubc.o
Loading

0 comments on commit 5647ac0

Please sign in to comment.