of_get_named_gpio

The interface has the following parameters.
  • Synopsis:
    int of_get_named_gpio(const struct device_node *np, const char *propname, int index)
  • Description: The function is used to obtain a GPIO interface via which you can use the GPIO Application Interface (API).
  • Parameter:
    • np: Device node to get GPIO from.
    • propname: Name of property containing GPIO specifier(s).
    • index: Index of the GPIO.
  • Return:
    • Success: The GPIO index number via which you can use the GPIO API.
    • Failure: Error code.