mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: bd71837: Staticize ldo_2_volts
@ 2018-06-27 12:40 Axel Lin
  2018-06-27 12:40 ` [PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation Axel Lin
  2018-06-27 15:00 ` Applied "regulator: bd71837: Staticize ldo_2_volts" " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2018-06-27 12:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Matti Vaittinen, Liam Girdwood, linux-kernel, Axel Lin

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/bd71837-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 6eae4d0432a2..403b45de1262 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -195,7 +195,7 @@ static const struct regulator_linear_range bd71837_ldo1_voltage_ranges[] = {
  * LDO2
  * 0.8 or 0.9V
  */
-const unsigned int ldo_2_volts[] = {
+static const unsigned int ldo_2_volts[] = {
 	900000, 800000
 };
 
-- 
2.14.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation
  2018-06-27 12:40 [PATCH 1/2] regulator: bd71837: Staticize ldo_2_volts Axel Lin
@ 2018-06-27 12:40 ` Axel Lin
  2018-06-27 15:00   ` Applied "regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation" to the regulator tree Mark Brown
  2018-06-27 15:00 ` Applied "regulator: bd71837: Staticize ldo_2_volts" " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2018-06-27 12:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Matti Vaittinen, Liam Girdwood, linux-kernel, Axel Lin

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/bd71837-regulator.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 403b45de1262..f57f42ed7160 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -73,14 +73,10 @@ static int bd71837_buck1234_set_ramp_delay(struct regulator_dev *rdev,
 static int bd71837_set_voltage_sel_restricted(struct regulator_dev *rdev,
 						    unsigned int sel)
 {
-	int ret;
-
-	ret = regulator_is_enabled_regmap(rdev);
-	if (!ret)
-		ret = regulator_set_voltage_sel_regmap(rdev, sel);
-	else if (ret == 1)
-		ret = -EBUSY;
-	return ret;
+	if (regulator_is_enabled_regmap(rdev))
+		return -EBUSY;
+
+	return regulator_set_voltage_sel_regmap(rdev, sel);
 }
 
 static struct regulator_ops bd71837_ldo_regulator_ops = {
-- 
2.14.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Applied "regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation" to the regulator tree
  2018-06-27 12:40 ` [PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation Axel Lin
@ 2018-06-27 15:00   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-06-27 15:00 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Mark Brown, Matti Vaittinen, Liam Girdwood,
	linux-kernel, linux-kernel

The patch

   regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation

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 ffdc4984100050d0c8e2f11f76a15ca36f5d9e37 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Wed, 27 Jun 2018 20:40:14 +0800
Subject: [PATCH] regulator: bd71837: Simplify
 bd71837_set_voltage_sel_restricted implementation

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd71837-regulator.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 403b45de1262..f57f42ed7160 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -73,14 +73,10 @@ static int bd71837_buck1234_set_ramp_delay(struct regulator_dev *rdev,
 static int bd71837_set_voltage_sel_restricted(struct regulator_dev *rdev,
 						    unsigned int sel)
 {
-	int ret;
-
-	ret = regulator_is_enabled_regmap(rdev);
-	if (!ret)
-		ret = regulator_set_voltage_sel_regmap(rdev, sel);
-	else if (ret == 1)
-		ret = -EBUSY;
-	return ret;
+	if (regulator_is_enabled_regmap(rdev))
+		return -EBUSY;
+
+	return regulator_set_voltage_sel_regmap(rdev, sel);
 }
 
 static struct regulator_ops bd71837_ldo_regulator_ops = {
-- 
2.18.0.rc2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Applied "regulator: bd71837: Staticize ldo_2_volts" to the regulator tree
  2018-06-27 12:40 [PATCH 1/2] regulator: bd71837: Staticize ldo_2_volts Axel Lin
  2018-06-27 12:40 ` [PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation Axel Lin
@ 2018-06-27 15:00 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-06-27 15:00 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Mark Brown, Matti Vaittinen, Liam Girdwood,
	linux-kernel, linux-kernel

The patch

   regulator: bd71837: Staticize ldo_2_volts

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 adb78a8e24bbfe19df0d4dd19ee78cec351a5f04 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Wed, 27 Jun 2018 20:40:13 +0800
Subject: [PATCH] regulator: bd71837: Staticize ldo_2_volts

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd71837-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 6eae4d0432a2..403b45de1262 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -195,7 +195,7 @@ static const struct regulator_linear_range bd71837_ldo1_voltage_ranges[] = {
  * LDO2
  * 0.8 or 0.9V
  */
-const unsigned int ldo_2_volts[] = {
+static const unsigned int ldo_2_volts[] = {
 	900000, 800000
 };
 
-- 
2.18.0.rc2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-27 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-27 12:40 [PATCH 1/2] regulator: bd71837: Staticize ldo_2_volts Axel Lin
2018-06-27 12:40 ` [PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation Axel Lin
2018-06-27 15:00   ` Applied "regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation" to the regulator tree Mark Brown
2018-06-27 15:00 ` Applied "regulator: bd71837: Staticize ldo_2_volts" " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®