Optional properties:
- gpio: GPIO to use for enable control
- startup-delay-us: startup time in microseconds
+- u-boot,off-on-delay-us: off delay time in microseconds
- regulator constraints (binding info: regulator.txt)
- enable-active-high: Polarity of GPIO is Active high. If this property
is missing, the default assumed is Active low.
struct fixed_regulator_platdata {
struct gpio_desc gpio; /* GPIO for regulator enable control */
unsigned int startup_delay_us;
+ unsigned int off_on_delay_us;
};
static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
/* Get optional ramp up delay */
dev_pdata->startup_delay_us = dev_read_u32_default(dev,
"startup-delay-us", 0);
+ dev_pdata->off_on_delay_us =
+ dev_read_u32_default(dev, "u-boot,off-on-delay-us", 0);
return 0;
}
udelay(dev_pdata->startup_delay_us);
debug("%s: done\n", __func__);
+ if (!enable && dev_pdata->off_on_delay_us)
+ udelay(dev_pdata->off_on_delay_us);
+
return 0;
}