linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"
@ 2019-07-11 11:35 Axel Lin
  2019-07-23 11:26 ` Mark Brown
  2019-07-24 19:17 ` Applied "regulator: lp87565: Fix probe failure for "ti,lp87565"" to the regulator tree Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2019-07-11 11:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Keerthy, Liam Girdwood, linux-kernel, Axel Lin

The "ti,lp87565" compatible string is still in of_lp87565_match_table,
but current code will return -EINVAL because lp87565->dev_type is unknown.
This was working in earlier kernel versions, so fix it.

Fixes: 7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Keerthy,
The commit "regulator: lp87565: Add 4-phase lp87561 regulator support" does not
mention why it returns -EINVAL for "ti,lp87565" (The data field is not set for
.compatible = "ti,lp87565"), so I think the support for "ti,lp87565" was accidently
removed.
I don't have this h/w for test, maybe you can test it since you wrote this driver.

 drivers/regulator/lp87565-regulator.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c
index 5d067f7c2116..0c440c5e2832 100644
--- a/drivers/regulator/lp87565-regulator.c
+++ b/drivers/regulator/lp87565-regulator.c
@@ -163,7 +163,7 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 	struct lp87565 *lp87565 = dev_get_drvdata(pdev->dev.parent);
 	struct regulator_config config = { };
 	struct regulator_dev *rdev;
-	int i, min_idx = LP87565_BUCK_0, max_idx = LP87565_BUCK_3;
+	int i, min_idx, max_idx;
 
 	platform_set_drvdata(pdev, lp87565);
 
@@ -182,9 +182,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 		max_idx = LP87565_BUCK_3210;
 		break;
 	default:
-		dev_err(lp87565->dev, "Invalid lp config %d\n",
-			lp87565->dev_type);
-		return -EINVAL;
+		min_idx = LP87565_BUCK_0;
+		max_idx = LP87565_BUCK_3;
+		break;
 	}
 
 	for (i = min_idx; i <= max_idx; i++) {
-- 
2.20.1


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

* Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"
  2019-07-11 11:35 [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565" Axel Lin
@ 2019-07-23 11:26 ` Mark Brown
  2019-07-23 12:28   ` Axel Lin
  2019-07-24 19:17 ` Applied "regulator: lp87565: Fix probe failure for "ti,lp87565"" to the regulator tree Mark Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2019-07-23 11:26 UTC (permalink / raw)
  To: Axel Lin; +Cc: Keerthy, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote:
> The "ti,lp87565" compatible string is still in of_lp87565_match_table,
> but current code will return -EINVAL because lp87565->dev_type is unknown.
> This was working in earlier kernel versions, so fix it.

This doesn't seem to apply against current code, please check and
resend.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"
  2019-07-23 11:26 ` Mark Brown
@ 2019-07-23 12:28   ` Axel Lin
  2019-07-23 16:35     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Axel Lin @ 2019-07-23 12:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Keerthy, Liam Girdwood, LKML

Mark Brown <broonie@kernel.org> 於 2019年7月23日 週二 下午7:26寫道:
>
> On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote:
> > The "ti,lp87565" compatible string is still in of_lp87565_match_table,
> > but current code will return -EINVAL because lp87565->dev_type is unknown.
> > This was working in earlier kernel versions, so fix it.
>
> This doesn't seem to apply against current code, please check and
> resend.

I re-generate the patch but the new patch is exactly the same as this one.
It can be applied to both Linus and linux-next trees.
Did I miss something?

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

* Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"
  2019-07-23 12:28   ` Axel Lin
@ 2019-07-23 16:35     ` Mark Brown
  2019-07-24  0:57       ` Axel Lin
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2019-07-23 16:35 UTC (permalink / raw)
  To: Axel Lin; +Cc: Keerthy, Liam Girdwood, LKML

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

On Tue, Jul 23, 2019 at 08:28:35PM +0800, Axel Lin wrote:
> Mark Brown <broonie@kernel.org> 於 2019年7月23日 週二 下午7:26寫道:
> > On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote:

> > > The "ti,lp87565" compatible string is still in of_lp87565_match_table,
> > > but current code will return -EINVAL because lp87565->dev_type is unknown.
> > > This was working in earlier kernel versions, so fix it.

> > This doesn't seem to apply against current code, please check and
> > resend.

> I re-generate the patch but the new patch is exactly the same as this one.
> It can be applied to both Linus and linux-next trees.
> Did I miss something?

It's a fix so I was trying to apply it on my for-5.3 branch.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"
  2019-07-23 16:35     ` Mark Brown
@ 2019-07-24  0:57       ` Axel Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Axel Lin @ 2019-07-24  0:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: Keerthy, Liam Girdwood, LKML

Mark Brown <broonie@kernel.org> 於 2019年7月24日 週三 上午12:35寫道:
>
> On Tue, Jul 23, 2019 at 08:28:35PM +0800, Axel Lin wrote:
> > Mark Brown <broonie@kernel.org> 於 2019年7月23日 週二 下午7:26寫道:
> > > On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote:
>
> > > > The "ti,lp87565" compatible string is still in of_lp87565_match_table,
> > > > but current code will return -EINVAL because lp87565->dev_type is unknown.
> > > > This was working in earlier kernel versions, so fix it.
>
> > > This doesn't seem to apply against current code, please check and
> > > resend.
>
> > I re-generate the patch but the new patch is exactly the same as this one.
> > It can be applied to both Linus and linux-next trees.
> > Did I miss something?
>
> It's a fix so I was trying to apply it on my for-5.3 branch.

The commit f3f4363b1239 ("regulator: lp87565: Fix missing break in
switch statement") from mfd tree has been merged to 5.3-rc1.
So I'm wondering if the better approach is rebase for-5.3 branch to 5.3-rc1.
Then you can apply this patch without conflict.

Anyway, I will resend the patch against regulator tree for-5.3.

Regards,
Axel

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

* Applied "regulator: lp87565: Fix probe failure for "ti,lp87565"" to the regulator tree
  2019-07-11 11:35 [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565" Axel Lin
  2019-07-23 11:26 ` Mark Brown
@ 2019-07-24 19:17 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2019-07-24 19:17 UTC (permalink / raw)
  To: Axel Lin; +Cc: Keerthy, Liam Girdwood, linux-kernel, Mark Brown

The patch

   regulator: lp87565: Fix probe failure for "ti,lp87565"

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.3

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 a853c0a0b013af3fee0f028cff3c44e275ce9abd Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Thu, 11 Jul 2019 19:35:17 +0800
Subject: [PATCH] regulator: lp87565: Fix probe failure for "ti,lp87565"

The "ti,lp87565" compatible string is still in of_lp87565_match_table,
but current code will return -EINVAL because lp87565->dev_type is unknown.
This was working in earlier kernel versions, so fix it.

Fixes: 7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20190711113517.26077-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/lp87565-regulator.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c
index 5d067f7c2116..0c440c5e2832 100644
--- a/drivers/regulator/lp87565-regulator.c
+++ b/drivers/regulator/lp87565-regulator.c
@@ -163,7 +163,7 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 	struct lp87565 *lp87565 = dev_get_drvdata(pdev->dev.parent);
 	struct regulator_config config = { };
 	struct regulator_dev *rdev;
-	int i, min_idx = LP87565_BUCK_0, max_idx = LP87565_BUCK_3;
+	int i, min_idx, max_idx;
 
 	platform_set_drvdata(pdev, lp87565);
 
@@ -182,9 +182,9 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 		max_idx = LP87565_BUCK_3210;
 		break;
 	default:
-		dev_err(lp87565->dev, "Invalid lp config %d\n",
-			lp87565->dev_type);
-		return -EINVAL;
+		min_idx = LP87565_BUCK_0;
+		max_idx = LP87565_BUCK_3;
+		break;
 	}
 
 	for (i = min_idx; i <= max_idx; i++) {
-- 
2.20.1


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

end of thread, other threads:[~2019-07-24 19:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 11:35 [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565" Axel Lin
2019-07-23 11:26 ` Mark Brown
2019-07-23 12:28   ` Axel Lin
2019-07-23 16:35     ` Mark Brown
2019-07-24  0:57       ` Axel Lin
2019-07-24 19:17 ` Applied "regulator: lp87565: Fix probe failure for "ti,lp87565"" to the regulator tree Mark Brown

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).