Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2bff060 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "regulator: Call proxy-consumer functions for each regulator registered"

parents e56fa944 ff753edc
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -4755,6 +4755,8 @@ regulator_register(const struct regulator_desc *regulator_desc,


	dev_set_drvdata(&rdev->dev, rdev);
	dev_set_drvdata(&rdev->dev, rdev);
	rdev_init_debugfs(rdev);
	rdev_init_debugfs(rdev);
	rdev->proxy_consumer = regulator_proxy_consumer_register(dev,
							config->of_node);


	/* try to resolve regulators supply since a new one was registered */
	/* try to resolve regulators supply since a new one was registered */
	class_for_each_device(&regulator_class, NULL, NULL,
	class_for_each_device(&regulator_class, NULL, NULL,
@@ -4794,6 +4796,7 @@ void regulator_unregister(struct regulator_dev *rdev)
			regulator_disable(rdev->supply);
			regulator_disable(rdev->supply);
		regulator_put(rdev->supply);
		regulator_put(rdev->supply);
	}
	}
	regulator_proxy_consumer_unregister(rdev->proxy_consumer);
	rdev_deinit_debugfs(rdev);
	rdev_deinit_debugfs(rdev);
	mutex_lock(&regulator_list_mutex);
	mutex_lock(&regulator_list_mutex);
	flush_work(&rdev->disable_work.work);
	flush_work(&rdev->disable_work.work);
+2 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/device.h>
#include <linux/device.h>
#include <linux/notifier.h>
#include <linux/notifier.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/proxy-consumer.h>


struct gpio_desc;
struct gpio_desc;
struct regmap;
struct regmap;
@@ -476,6 +477,7 @@ struct regulator_dev {


	/* time when this regulator was disabled last time */
	/* time when this regulator was disabled last time */
	unsigned long last_off_jiffy;
	unsigned long last_off_jiffy;
	struct proxy_consumer *proxy_consumer;
	struct regulator *debug_consumer;
	struct regulator *debug_consumer;
};
};