devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Maciej Purski <m.purski@samsung.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.orgMark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Doug Anderson <dianders@chromium.org>,
	Bartlomiej Zolnierkiewicz
	<b.zolnierkie@samsung.com>linux-kernel@vger.kernel.org
Subject: Applied "regulator: core: Refactor regulator_list_voltage()" to the regulator tree
Date: Fri, 26 Jan 2018 17:35:44 +0000	[thread overview]
Message-ID: <E1ef7ui-0002cM-Mz@debutante> (raw)
In-Reply-To: <1516631412-17542-3-git-send-email-m.purski@samsung.com>

The patch

   regulator: core: Refactor regulator_list_voltage()

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.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 3d67fe950707a930664c5673ecc026f1bb497136 Mon Sep 17 00:00:00 2001
From: Maciej Purski <m.purski@samsung.com>
Date: Mon, 22 Jan 2018 15:30:07 +0100
Subject: [PATCH] regulator: core: Refactor regulator_list_voltage()

Change _regulator_list_voltage() argument from regulator to
regulator_dev in order to provide better separation of core layers.
Allow calling _regulator_list_voltage() from functions, with
regulator_dev argument. This refactoring is needed in order to
implement setting voltage of coupled regulators.

Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5f7678292cef..fd8eacfea422 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2447,10 +2447,9 @@ static int _regulator_is_enabled(struct regulator_dev *rdev)
 	return rdev->desc->ops->is_enabled(rdev);
 }
 
-static int _regulator_list_voltage(struct regulator *regulator,
-				    unsigned selector, int lock)
+static int _regulator_list_voltage(struct regulator_dev *rdev,
+				   unsigned selector, int lock)
 {
-	struct regulator_dev *rdev = regulator->rdev;
 	const struct regulator_ops *ops = rdev->desc->ops;
 	int ret;
 
@@ -2466,7 +2465,8 @@ static int _regulator_list_voltage(struct regulator *regulator,
 		if (lock)
 			mutex_unlock(&rdev->mutex);
 	} else if (rdev->is_switch && rdev->supply) {
-		ret = _regulator_list_voltage(rdev->supply, selector, lock);
+		ret = _regulator_list_voltage(rdev->supply->rdev,
+					      selector, lock);
 	} else {
 		return -EINVAL;
 	}
@@ -2542,7 +2542,7 @@ EXPORT_SYMBOL_GPL(regulator_count_voltages);
  */
 int regulator_list_voltage(struct regulator *regulator, unsigned selector)
 {
-	return _regulator_list_voltage(regulator, selector, 1);
+	return _regulator_list_voltage(regulator->rdev, selector, 1);
 }
 EXPORT_SYMBOL_GPL(regulator_list_voltage);
 
-- 
2.15.1

  reply	other threads:[~2018-01-26 17:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180122143019eucas1p213b852c98cde3fb8a77b96ab0d372ee6@eucas1p2.samsung.com>
2018-01-22 14:30 ` [PATCH v4 0/7] Add coupled regulators mechanism Maciej Purski
     [not found]   ` <CGME20180122143029eucas1p284202b6e60a86b428b3aa1e6eef62bda@eucas1p2.samsung.com>
2018-01-22 14:30     ` [PATCH v4 1/7] regulator: core: Move of_find_regulator_by_node() to of_regulator.c Maciej Purski
     [not found]   ` <CGME20180122143030eucas1p2eb1054dd14902eb0be83e5c9efb11d98@eucas1p2.samsung.com>
2018-01-22 14:30     ` [PATCH v4 2/7] regulator: core: Refactor regulator_list_voltage() Maciej Purski
2018-01-26 17:35       ` Mark Brown [this message]
     [not found]   ` <CGME20180122143031eucas1p205647b3821760ad7e7a3bef5f8873d14@eucas1p2.samsung.com>
     [not found]     ` <1516631412-17542-1-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2018-01-22 14:30       ` [PATCH v4 3/7] regulator: bindings: Add properties for coupled regulators Maciej Purski
2018-01-22 14:30       ` [PATCH v4 6/7] regulator: core: Add voltage balancing mechanism Maciej Purski
2018-03-02 12:55         ` Applied "regulator: core: Add voltage balancing mechanism" to the regulator tree Mark Brown
2018-05-17 16:41         ` Mark Brown
2018-01-22 14:30       ` [PATCH v4 7/7] regulator: core: Change voltage setting path Maciej Purski
     [not found]   ` <CGME20180122143032eucas1p229e2ec741318df3e716e736796bbb9c1@eucas1p2.samsung.com>
2018-01-22 14:30     ` [PATCH v4 4/7] regulator: core: Parse coupled regulators properties Maciej Purski
     [not found]   ` <CGME20180122143033eucas1p2adb3b39af238b2449486389d214a3a68@eucas1p2.samsung.com>
2018-01-22 14:30     ` [PATCH v4 5/7] regulator: core: Resolve coupled regulators Maciej Purski
2018-03-02 12:55       ` Applied "regulator: core: Resolve coupled regulators" to the regulator tree Mark Brown
2018-01-26 17:31   ` [PATCH v4 0/7] Add coupled regulators mechanism Mark Brown
2018-03-01 19:38   ` 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=E1ef7ui-0002cM-Mz@debutante \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.orgMark \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.purski@samsung.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).