]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpio: of: Improve kerneldoc
authorThierry Reding <treding@nvidia.com>
Mon, 24 Jul 2017 14:57:23 +0000 (16:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Aug 2017 13:01:13 +0000 (15:01 +0200)
Add descriptions for missing fields and fix up some parameter references
to match the code.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c
include/linux/gpio/driver.h

index 8cde02ed5fd5a71908a4855ac752020d8b187237..bfcd20699ec8897bb48bb319f278abc6f85d0469 100644 (file)
@@ -273,14 +273,13 @@ static int of_gpiochip_scan_gpios(struct gpio_chip *chip)
 }
 
 /**
- * of_gpio_simple_xlate - translate gpio_spec to the GPIO number and flags
+ * of_gpio_simple_xlate - translate gpiospec to the GPIO number and flags
  * @gc:                pointer to the gpio_chip structure
- * @np:                device node of the GPIO chip
- * @gpio_spec: gpio specifier as found in the device tree
+ * @gpiospec:  GPIO specifier as found in the device tree
  * @flags:     a flags pointer to fill in
  *
  * This is simple translation function, suitable for the most 1:1 mapped
- * gpio chips. This function performs only one sanity check: whether gpio
+ * GPIO chips. This function performs only one sanity check: whether GPIO
  * is less than ngpios (that is specified in the gpio_chip).
  */
 int of_gpio_simple_xlate(struct gpio_chip *gc,
index ad4150d075c39da9031a513207045df8de8025e0..fe66c9306caf0b6cf91d04a3ff6c1428a77e4e87 100644 (file)
@@ -180,8 +180,27 @@ struct gpio_chip {
         * If CONFIG_OF is enabled, then all GPIO controllers described in the
         * device tree automatically may have an OF translation
         */
+
+       /**
+        * @of_node:
+        *
+        * Pointer to a device tree node representing this GPIO controller.
+        */
        struct device_node *of_node;
+
+       /**
+        * @of_gpio_n_cells:
+        *
+        * Number of cells used to form the GPIO specifier.
+        */
        int of_gpio_n_cells;
+
+       /**
+        * @of_xlate:
+        *
+        * Callback to translate a device tree GPIO specifier into a chip-
+        * relative GPIO number and flags.
+        */
        int (*of_xlate)(struct gpio_chip *gc,
                        const struct of_phandle_args *gpiospec, u32 *flags);
 #endif