]> Git Repo - linux.git/commitdiff
Merge remote-tracking branches 'regulator/topic/88pg86x', 'regulator/topic/dt', ...
authorMark Brown <[email protected]>
Wed, 28 Mar 2018 02:33:53 +0000 (10:33 +0800)
committerMark Brown <[email protected]>
Wed, 28 Mar 2018 02:33:53 +0000 (10:33 +0800)
1  2  3  4  5 
drivers/regulator/core.c

diff --combined drivers/regulator/core.c
index 1fc0c0811da4e9f2e528c21cbc4578bbe5a32077,dd4708c58480d277e0346f9b287831b080f8af6b,dd4708c58480d277e0346f9b287831b080f8af6b,bdd9470839249cea5f95c4692d831d93c99bad62,4549b93b0ff9d0daf6a8898c48fa1cef960cd30b..d4803460a557eac7d8eade3fcdf4b1496313463c
@@@@@@ -1937,7 -1937,7 -1937,7 -1937,7 -1937,10 +1937,10 @@@@@@ static int regulator_ena_gpio_request(s
        struct gpio_desc *gpiod;
        int ret;
     
----    gpiod = gpio_to_desc(config->ena_gpio);
++++    if (config->ena_gpiod)
++++            gpiod = config->ena_gpiod;
++++    else
++++            gpiod = gpio_to_desc(config->ena_gpio);
     
        list_for_each_entry(pin, &regulator_ena_gpio_list, list) {
                if (pin->gpiod == gpiod) {
                }
        }
     
----    ret = gpio_request_one(config->ena_gpio,
----                            GPIOF_DIR_OUT | config->ena_gpio_flags,
----                            rdev_get_name(rdev));
----    if (ret)
----            return ret;
++++    if (!config->ena_gpiod) {
++++            ret = gpio_request_one(config->ena_gpio,
++++                                   GPIOF_DIR_OUT | config->ena_gpio_flags,
++++                                   rdev_get_name(rdev));
++++            if (ret)
++++                    return ret;
++++    }
     
        pin = kzalloc(sizeof(struct regulator_enable_gpio), GFP_KERNEL);
        if (pin == NULL) {
----            gpio_free(config->ena_gpio);
++++            if (!config->ena_gpiod)
++++                    gpio_free(config->ena_gpio);
                return -ENOMEM;
        }
     
@@@@@@ -4154,8 -4154,8 -4154,8 -4154,8 -4160,9 +4160,9 @@@@@@ regulator_register(const struct regulat
                        goto clean;
        }
     
----    if ((config->ena_gpio || config->ena_gpio_initialized) &&
----        gpio_is_valid(config->ena_gpio)) {
++++    if (config->ena_gpiod ||
++++        ((config->ena_gpio || config->ena_gpio_initialized) &&
++++         gpio_is_valid(config->ena_gpio))) {
                mutex_lock(&regulator_list_mutex);
                ret = regulator_ena_gpio_request(rdev, config);
                mutex_unlock(&regulator_list_mutex);
@@@@@@ -4301,6 -4301,6 -4301,6 -4301,7 -4308,6 +4308,7 @@@@@@ static int regulator_suspend_late(struc
        return class_for_each_device(&regulator_class, NULL, &state,
                                     _regulator_suspend_late);
     }
+++ +
     static int _regulator_resume_early(struct device *dev, void *data)
     {
        int ret = 0;
     
        rstate = regulator_get_suspend_state(rdev, *state);
        if (rstate == NULL)
 ----           return -EINVAL;
 ++++           return 0;
     
        mutex_lock(&rdev->mutex);
     
This page took 0.109254 seconds and 4 git commands to generate.