alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Marek Vasut <marex@denx.de>
Cc: alsa-devel@alsa-project.org,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Igor Opaniuk <igor.opaniuk@toradex.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Oleksandr Suvorov <oleksandr.suvorov@toradex.com>,
	Mark Brown <broonie@kernel.org>,
	festevam@gmail.com
Subject: [alsa-devel] Applied "regulator: core: Add regulator_is_equal() helper" to the asoc tree
Date: Tue, 14 Jan 2020 16:09:07 +0000 (GMT)	[thread overview]
Message-ID: <applied-20191220164450.1395038-1-marex@denx.de> (raw)
In-Reply-To: <20191220164450.1395038-1-marex@denx.de>

The patch

   regulator: core: Add regulator_is_equal() helper

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From b059b7e0ec3208ff1e17cff6387d75a9fbab4e02 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marex@denx.de>
Date: Fri, 20 Dec 2019 17:44:49 +0100
Subject: [PATCH] regulator: core: Add regulator_is_equal() helper

Add regulator_is_equal() helper to compare whether two regulators are
the same. This is useful for checking whether two separate regulators
in a driver are actually the same supply.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Igor Opaniuk <igor.opaniuk@toradex.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Link: https://lore.kernel.org/r/20191220164450.1395038-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/helpers.c        | 14 ++++++++++++++
 include/linux/regulator/consumer.h |  7 +++++++
 2 files changed, 21 insertions(+)

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);
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 337a46391527..2c89d886595c 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -287,6 +287,8 @@ void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
 				     const char *const *supply_names,
 				     unsigned int num_supplies);
 
+bool regulator_is_equal(struct regulator *reg1, struct regulator *reg2);
+
 #else
 
 /*
@@ -593,6 +595,11 @@ regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
 {
 }
 
+static inline bool
+regulator_is_equal(struct regulator *reg1, struct regulator *reg2);
+{
+	return false;
+}
 #endif
 
 static inline int regulator_set_voltage_triplet(struct regulator *regulator,
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2020-01-14 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 16:44 [alsa-devel] [PATCH V2 1/2] regulator: core: Add regulator_is_equal() helper Marek Vasut
2019-12-20 16:44 ` [alsa-devel] [PATCH V2 2/2] ASoC: sgtl5000: Fix VDDA and VDDIO comparison Marek Vasut
2020-01-14 16:09   ` [alsa-devel] Applied "ASoC: sgtl5000: Fix VDDA and VDDIO comparison" to the asoc tree Mark Brown
2020-01-14 16:09 ` Mark Brown [this message]
2020-01-14 19:48 ` [alsa-devel] [PATCH V2 1/2] regulator: core: Add regulator_is_equal() helper Pierre-Louis Bossart
2020-01-16 11:59   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=applied-20191220164450.1395038-1-marex@denx.de \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=festevam@gmail.com \
    --cc=igor.opaniuk@toradex.com \
    --cc=lgirdwood@gmail.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marex@denx.de \
    --cc=oleksandr.suvorov@toradex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).