浏览代码

gpio: documenatation: fix GPIO_LOOKUP{,_IDX} documentation

The 'dev_id' parameter of the GPIO_LOOKUP{,_IDX} macros were removed by
commit ad824783fb23 ("gpio: better lookup method for platform GPIOs").

Update the documentation to reflect that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Gabor Juhos 9 年之前
父节点
当前提交
cfb7428c3d
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      Documentation/gpio/board.txt

+ 5 - 6
Documentation/gpio/board.txt

@@ -111,16 +111,13 @@ files that desire to do so need to include the following header:
 GPIOs are mapped by the means of tables of lookups, containing instances of the
 GPIOs are mapped by the means of tables of lookups, containing instances of the
 gpiod_lookup structure. Two macros are defined to help declaring such mappings:
 gpiod_lookup structure. Two macros are defined to help declaring such mappings:
 
 
-	GPIO_LOOKUP(chip_label, chip_hwnum, dev_id, con_id, flags)
-	GPIO_LOOKUP_IDX(chip_label, chip_hwnum, dev_id, con_id, idx, flags)
+	GPIO_LOOKUP(chip_label, chip_hwnum, con_id, flags)
+	GPIO_LOOKUP_IDX(chip_label, chip_hwnum, con_id, idx, flags)
 
 
 where
 where
 
 
   - chip_label is the label of the gpiod_chip instance providing the GPIO
   - chip_label is the label of the gpiod_chip instance providing the GPIO
   - chip_hwnum is the hardware number of the GPIO within the chip
   - chip_hwnum is the hardware number of the GPIO within the chip
-  - dev_id is the identifier of the device that will make use of this GPIO. It
-	can be NULL, in which case it will be matched for calls to gpiod_get()
-	with a NULL device.
   - con_id is the name of the GPIO function from the device point of view. It
   - con_id is the name of the GPIO function from the device point of view. It
 	can be NULL, in which case it will match any function.
 	can be NULL, in which case it will match any function.
   - idx is the index of the GPIO within the function.
   - idx is the index of the GPIO within the function.
@@ -134,7 +131,9 @@ In the future, these flags might be extended to support more properties.
 Note that GPIO_LOOKUP() is just a shortcut to GPIO_LOOKUP_IDX() where idx = 0.
 Note that GPIO_LOOKUP() is just a shortcut to GPIO_LOOKUP_IDX() where idx = 0.
 
 
 A lookup table can then be defined as follows, with an empty entry defining its
 A lookup table can then be defined as follows, with an empty entry defining its
-end:
+end. The 'dev_id' field of the table is the identifier of the device that will
+make use of these GPIOs. It can be NULL, in which case it will be matched for
+calls to gpiod_get() with a NULL device.
 
 
 struct gpiod_lookup_table gpios_table = {
 struct gpiod_lookup_table gpios_table = {
 	.dev_id = "foo.0",
 	.dev_id = "foo.0",