summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/helpers.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-01-23 12:36:45 +0000
committerMark Brown <broonie@kernel.org>2020-01-23 12:36:45 +0000
commita7196caf83ea9e9b56c5c8c95fbfe0d45acec46b (patch)
treed9147ac16e1af83463bad4e45b233bc8e51f2e0e /drivers/regulator/helpers.c
parent20230620b44510ce968a719a1d6ee7483583178d (diff)
parentd8e2e0d2491e78f3f7b451c3a93ba29950efe2cf (diff)
downloadtalos-op-linux-a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b.tar.gz
talos-op-linux-a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b.zip
Merge branch 'asoc-5.6' into asoc-next
Diffstat (limited to 'drivers/regulator/helpers.c')
-rw-r--r--drivers/regulator/helpers.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c
index ca3dc3f3bb29..bb16c465426e 100644
--- a/drivers/regulator/helpers.c
+++ b/drivers/regulator/helpers.c
@@ -13,6 +13,8 @@
#include <linux/regulator/driver.h>
#include <linux/module.h>
+#include "internal.h"
+
/**
* regulator_is_enabled_regmap - standard is_enabled() for regmap users
*
@@ -881,3 +883,15 @@ void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
consumers[i].supply = supply_names[i];
}
EXPORT_SYMBOL_GPL(regulator_bulk_set_supply_names);
+
+/**
+ * regulator_is_equal - test whether two regulators are the same
+ *
+ * @reg1: first regulator to operate on
+ * @reg2: second regulator to operate on
+ */
+bool regulator_is_equal(struct regulator *reg1, struct regulator *reg2)
+{
+ return reg1->rdev == reg2->rdev;
+}
+EXPORT_SYMBOL_GPL(regulator_is_equal);
OpenPOWER on IntegriCloud