Hi,

  You can't seem to use:

     gpio = <&gpio1 0 0>;

  inside of:

    reg_usb_otg_vbus: usb_otg_vbus {


  because that equates to a value of zero in config->ena_gpio
in drivers/regulator/core.c:

   if (config->ena_gpio && gpio_is_valid(config->ena_gpio)) {

  which means it won't drop into the if statement.  I think I have a fix
but it's a bit invasive, touches a lot of files.  The gist is changing:

        struct regulator_config cfg = { };

 to
        struct regulator_config cfg = { .ena_gpio = -ENODEV, };  /* set to
invalid, we we can use zero */


  and changing:
        if (whatever->ena_gpio)

 to:
        if (gpio_is_valid(whatever->ena_gpio))

  Maybe someone has a better idea...

  Cheers,

  Rick






--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to