regulator: fix: Move code to enable gpio regulator to pre_probe from ofdata_to_platdata
[oweals/u-boot.git] / drivers / power / regulator / regulator_common.c
index 939efb2c0d0d9ace36e74b95e59da8479a71c183..33b73b7c2f5eeb20feef6bee4ea3b22834f94ef3 100644 (file)
@@ -12,16 +12,11 @@ int regulator_common_ofdata_to_platdata(struct udevice *dev,
        struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name)
 {
        struct gpio_desc *gpio;
-       struct dm_regulator_uclass_platdata *uc_pdata;
        int flags = GPIOD_IS_OUT;
        int ret;
 
-       uc_pdata = dev_get_uclass_platdata(dev);
-
        if (!dev_read_bool(dev, "enable-active-high"))
                flags |= GPIOD_ACTIVE_LOW;
-       if (uc_pdata->boot_on)
-               flags |= GPIOD_IS_OUT_ACTIVE;
 
        /* Get optional enable GPIO desc */
        gpio = &dev_pdata->gpio;