Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5647ac0a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux

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
parents 1763e735 f4c54050
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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>

+4 −4
Original line number Diff line number Diff line
@@ -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>

+0 −3
Original line number Diff line number Diff line
@@ -55,9 +55,6 @@ config GENERIC_CALIBRATE_DELAY
	bool
	default y

config GENERIC_GPIO
	bool

config ZONE_DMA
	bool
	default y
+0 −3
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)
Loading