title: Can't access gpio line with gpiod_line_request_output() on Adafruit FT232H
body: <p>I am using an Adafruit Ft232H breakout to add GPIO ports to my Linux pc. Although I had some success to flash a led with <code>libftdi</code> and bitbang mode, I don't have the same luck with <code>libgpiod</code> because <code>gpiod_line_request_output</code> is failing.</p>
  <p>Some gpio information of my system:</p>
  <pre><code>sudo gpiodetect
  gpiochip0 [ftdi-cbus] (4 lines)
  
  sudo gpioinfo
  gpiochip0 - 4 lines:
          line   0:      unnamed       unused   input  active-high 
          line   1:      unnamed       unused   input  active-high 
          line   2:      unnamed       unused   input  active-high 
          line   3:      unnamed       unused   input  active-high
  </code></pre>
  <p>This is the C program which tries to access the line 0.</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #include &lt;gpiod.h&gt;
  
  #define LINE_NUM 0
  
  void gpio_fatal(struct gpiod_chip* chip, const char msg[20]);
  
  int main(int argc, char** argv)
  {
      struct gpiod_chip*  chip;
      struct gpiod_line*  line;
      const char path[] = &quot;/dev/gpiochip0&quot;;
  
      chip = gpiod_chip_open(path);
      if(!chip)
      {
          fprintf(stderr, &quot;Error opening path\n&quot;);
          return EXIT_FAILURE;
      }
  
      line = gpiod_chip_get_line(chip, LINE_NUM);
      if(!line)
      {
          fprintf(stderr, &quot;error getting this line\n&quot;);
          return EXIT_FAILURE;
      }
  
      int ret = gpiod_line_request_output(line,
                          &quot;ftdi-cbus&quot;,
                          1);
      if(ret != 0)
          gpio_fatal(chip, &quot;Request output failed&quot;);
  
      for(;;)
      {
          gpiod_line_set_value(line, 1);
          printf(&quot;On\n&quot;);
          sleep(1);
          gpiod_line_set_value(line, 0);
          printf(&quot;Off\n&quot;);
          sleep(1);
      }
  
      gpiod_line_release(line);
      gpiod_chip_close(chip);
  
      return EXIT_SUCCESS;
  }
  
  void gpio_fatal(struct gpiod_chip* chip, const char* msg)
  {
      fprintf(stderr, &quot;%s\n&quot;, msg);
      gpiod_chip_close(chip);
      exit(EXIT_FAILURE);
  }
  </code></pre>
  <p>Running the executable with <code>sudo</code> gives me:</p>
  <pre><code>sudo g_gpiod/build/g_gpiod 
  Password: 
  Request output failed
  </code></pre>
  <p><code>gpiod.h</code> states for the failing function the following:</p>
  <pre><code>/**
   * @brief Reserve a single line, set the direction to output.
   * @param line GPIO line object.
   * @param consumer Name of the consumer.
   * @param default_val Initial line value.
   * @return 0 if the line was properly reserved, -1 on failure.
   */
  int gpiod_line_request_output(struct gpiod_line *line,
                    const char *consumer, int default_val) GPIOD_API;
  </code></pre>
  <p>The parameters seem to be correct, for what reason could this be failing? Other examples using <code>libftdi</code> or <code>CircuitPython</code> can access the ports and work correctly.</p>