Commit aea92b54 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

Merge tag 'intel-gpio-v6.4-1' of...

Merge tag 'intel-gpio-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next

intel-gpio for v6.4-1

* Remove some of the legacy APIs that are not used anymore
* Clean up headers in the GPIO library and drivers

The following is an automated git shortlog grouped by driver:

aggregator:
 -  Add missing header(s)

ARM:
 -  s3c64xx: Use the right include
 -  orion/gpio: Use the right include

gpiolib:
 -  Clean up headers
 -  Group forward declarations in consumer.h
 -  Deduplicate forward declarations in consumer.h
 -  Drop unused forward declaration from driver.h
 -  split of_mm_gpio_chip out of linux/of_gpio.h
 -  split linux/gpio/driver.h out of linux/gpio.h
 -  remove legacy gpio_export()
 -  remove gpio_set_debounce()
 -  remove asm-generic/gpio.h
 -  coldfire: remove custom asm/gpio.h
 -  remove empty asm/gpio.h files
 -  Make the legacy <linux/gpio.h> consumer-only

hte:
 -  tegra-194: Use proper includes

reg:
 -  Add missing header(s)

regmap:
 -  Add missing header(s)
parents 0d8b4049 380c7ba3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ requested using gpio_request()::
	/* export the GPIO to userspace */
	int gpiod_export(struct gpio_desc *desc, bool direction_may_change);

	/* reverse gpio_export() */
	/* reverse gpiod_export() */
	void gpiod_unexport(struct gpio_desc *desc);

	/* create a sysfs link to an exported GPIO node */
+0 −23
Original line number Diff line number Diff line
@@ -238,8 +238,6 @@ setup or driver probe/teardown code, so this is an easy constraint.)::
        ## 	gpio_free_array()

                gpio_free()
                gpio_set_debounce()



Claiming and Releasing GPIOs
@@ -716,27 +714,6 @@ gpiochip nodes (possibly in conjunction with schematics) to determine
the correct GPIO number to use for a given signal.


Exporting from Kernel code
--------------------------
Kernel code can explicitly manage exports of GPIOs which have already been
requested using gpio_request()::

	/* export the GPIO to userspace */
	int gpio_export(unsigned gpio, bool direction_may_change);

	/* reverse gpio_export() */
	void gpio_unexport();

After a kernel driver requests a GPIO, it may only be made available in
the sysfs interface by gpio_export().  The driver can control whether the
signal direction may change.  This helps drivers prevent userspace code
from accidentally clobbering important system state.

This explicit exporting can help with debugging (by making some kinds
of experiments easier), or can provide an always-there interface that's
suitable for documenting as part of a board support package.


API Reference
=============

+0 −20
Original line number Diff line number Diff line
@@ -219,7 +219,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
        ## 	gpio_free_array()

                gpio_free()
                gpio_set_debounce()



@@ -654,25 +653,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO
确定给定信号所用的 GPIO 编号。


从内核代码中导出
----------------

内核代码可以明确地管理那些已通过 gpio_request()申请的 GPIO 的导出::

	/* 导出 GPIO 到用户空间 */
	int gpio_export(unsigned gpio, bool direction_may_change);

	/* gpio_export()的逆操作 */
	void gpio_unexport();

在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs
接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间
破坏重要的系统状态。

这个明确的导出有助于(通过使某些实验更容易来)调试,也可以提供一个始终存在的接口,
与文档配合作为板级支持包的一部分。


API参考
=======

+0 −19
Original line number Diff line number Diff line
@@ -226,7 +226,6 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其
## 	gpio_free_array()

	gpio_free()
	gpio_set_debounce()



@@ -615,21 +614,3 @@ GPIO 控制器的路徑類似 /sys/class/gpio/gpiochip42/ (對於從#42 GPIO
固定的,例如在擴展卡上的 GPIO會根據所使用的主板或所在堆疊架構中其他的板子而
有所不同。在這種情況下,你可能需要使用 gpiochip 節點(儘可能地結合電路圖)來
確定給定信號所用的 GPIO 編號。


從內核代碼中導出
-------------
內核代碼可以明確地管理那些已通過 gpio_request()申請的 GPIO 的導出:

	/* 導出 GPIO 到用戶空間 */
	int gpio_export(unsigned gpio, bool direction_may_change);

	/* gpio_export()的逆操作 */
	void gpio_unexport();

在一個內核驅動申請一個 GPIO 之後,它可以通過 gpio_export()使其在 sysfs
接口中可見。該驅動可以控制信號方向是否可修改。這有助於防止用戶空間代碼無意間
破壞重要的系統狀態。

這個明確的導出有助於(通過使某些實驗更容易來)調試,也可以提供一個始終存在的接口,
與文檔配合作爲板級支持包的一部分。
+0 −1
Original line number Diff line number Diff line
@@ -8752,7 +8752,6 @@ F: Documentation/admin-guide/gpio/
F:	Documentation/devicetree/bindings/gpio/
F:	Documentation/driver-api/gpio/
F:	drivers/gpio/
F:	include/asm-generic/gpio.h
F:	include/dt-bindings/gpio/
F:	include/linux/gpio.h
F:	include/linux/gpio/
Loading