All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
@ 2019-06-12 14:46 ` Keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: Keerthy @ 2019-06-12 14:46 UTC (permalink / raw)
  To: lee.jones, broonie; +Cc: linux-kernel, linux-omap, t-kristo, j-keerthy

The LP8756x family has a single output 4-phase regulator
configuration. Add support for the same. The control
lies in the master buck which is buck0 for 4-phase
configuration. Enable/disable/voltage set happen via
buck0 registers.

Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
---

patches 1/3 2/3 are already applied to linux-next.

Changes in v2:

  * Changed if/else block to switch statement.

 drivers/regulator/lp87565-regulator.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c
index 81eb4b890c0c..af00d1ffcf33 100644
--- a/drivers/regulator/lp87565-regulator.c
+++ b/drivers/regulator/lp87565-regulator.c
@@ -153,6 +153,12 @@ static const struct lp87565_regulator regulators[] = {
 			  LP87565_REG_BUCK2_CTRL_1,
 			  LP87565_BUCK_CTRL_1_EN, 3230,
 			  buck0_1_2_3_ranges, LP87565_REG_BUCK2_CTRL_2),
+	LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
+			  lp87565_buck_ops, 256, LP87565_REG_BUCK0_VOUT,
+			  LP87565_BUCK_VSET, LP87565_REG_BUCK0_CTRL_1,
+			  LP87565_BUCK_CTRL_1_EN |
+			  LP87565_BUCK_CTRL_1_FPWM_MP_0_2, 3230,
+			  buck0_1_2_3_ranges, LP87565_REG_BUCK0_CTRL_2),
 };
 
 static int lp87565_regulator_probe(struct platform_device *pdev)
@@ -169,9 +175,18 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 	config.driver_data = lp87565;
 	config.regmap = lp87565->regmap;
 
-	if (lp87565->dev_type == LP87565_DEVICE_TYPE_LP87565_Q1) {
+	switch (lp87565->dev_type) {
+	case LP87565_DEVICE_TYPE_LP87565_Q1:
 		min_idx = LP87565_BUCK_10;
 		max_idx = LP87565_BUCK_23;
+		break;
+	case LP87565_DEVICE_TYPE_LP87561_Q1:
+		min_idx = LP87565_BUCK_3210;
+		max_idx = LP87565_BUCK_3210;
+	default:
+		dev_err(lp87565->dev, "Invalid lp config %d\n",
+			lp87565->dev_type);
+		return -EINVAL;
 	}
 
 	for (i = min_idx; i <= max_idx; i++) {
-- 
2.17.1


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

* [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
@ 2019-06-12 14:46 ` Keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: Keerthy @ 2019-06-12 14:46 UTC (permalink / raw)
  To: lee.jones, broonie; +Cc: linux-kernel, linux-omap, t-kristo, j-keerthy

The LP8756x family has a single output 4-phase regulator
configuration. Add support for the same. The control
lies in the master buck which is buck0 for 4-phase
configuration. Enable/disable/voltage set happen via
buck0 registers.

Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
---

patches 1/3 2/3 are already applied to linux-next.

Changes in v2:

  * Changed if/else block to switch statement.

 drivers/regulator/lp87565-regulator.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/lp87565-regulator.c b/drivers/regulator/lp87565-regulator.c
index 81eb4b890c0c..af00d1ffcf33 100644
--- a/drivers/regulator/lp87565-regulator.c
+++ b/drivers/regulator/lp87565-regulator.c
@@ -153,6 +153,12 @@ static const struct lp87565_regulator regulators[] = {
 			  LP87565_REG_BUCK2_CTRL_1,
 			  LP87565_BUCK_CTRL_1_EN, 3230,
 			  buck0_1_2_3_ranges, LP87565_REG_BUCK2_CTRL_2),
+	LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
+			  lp87565_buck_ops, 256, LP87565_REG_BUCK0_VOUT,
+			  LP87565_BUCK_VSET, LP87565_REG_BUCK0_CTRL_1,
+			  LP87565_BUCK_CTRL_1_EN |
+			  LP87565_BUCK_CTRL_1_FPWM_MP_0_2, 3230,
+			  buck0_1_2_3_ranges, LP87565_REG_BUCK0_CTRL_2),
 };
 
 static int lp87565_regulator_probe(struct platform_device *pdev)
@@ -169,9 +175,18 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
 	config.driver_data = lp87565;
 	config.regmap = lp87565->regmap;
 
-	if (lp87565->dev_type == LP87565_DEVICE_TYPE_LP87565_Q1) {
+	switch (lp87565->dev_type) {
+	case LP87565_DEVICE_TYPE_LP87565_Q1:
 		min_idx = LP87565_BUCK_10;
 		max_idx = LP87565_BUCK_23;
+		break;
+	case LP87565_DEVICE_TYPE_LP87561_Q1:
+		min_idx = LP87565_BUCK_3210;
+		max_idx = LP87565_BUCK_3210;
+	default:
+		dev_err(lp87565->dev, "Invalid lp config %d\n",
+			lp87565->dev_type);
+		return -EINVAL;
 	}
 
 	for (i = min_idx; i <= max_idx; i++) {
-- 
2.17.1

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
  2019-06-12 14:46 ` Keerthy
  (?)
@ 2019-06-13 15:45 ` Mark Brown
  2019-06-13 17:02     ` keerthy
  -1 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2019-06-13 15:45 UTC (permalink / raw)
  To: Keerthy; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo

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

On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:

> patches 1/3 2/3 are already applied to linux-next.

This doesn't build without those patches:

  CC      drivers/regulator/lp87565-regulator.o
drivers/regulator/lp87565-regulator.c:156:32: error: ‘LP87565_BUCK_3210’ undeclared here (not in a function); did you mean ‘LP87565_BUCK_10’?
  LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
                                ^~~~~~~~~~~~~~~~~

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

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
  2019-06-13 15:45 ` Mark Brown
@ 2019-06-13 17:02     ` keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: keerthy @ 2019-06-13 17:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo



On 6/13/2019 9:15 PM, Mark Brown wrote:
> On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:
> 
>> patches 1/3 2/3 are already applied to linux-next.
> 
> This doesn't build without those patches:

They are already on next. Do you want me to resend them as well?

> 
>    CC      drivers/regulator/lp87565-regulator.o
> drivers/regulator/lp87565-regulator.c:156:32: error: ‘LP87565_BUCK_3210’ undeclared here (not in a function); did you mean ‘LP87565_BUCK_10’?
>    LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
>                                  ^~~~~~~~~~~~~~~~~
> 

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
@ 2019-06-13 17:02     ` keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: keerthy @ 2019-06-13 17:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo



On 6/13/2019 9:15 PM, Mark Brown wrote:
> On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:
> 
>> patches 1/3 2/3 are already applied to linux-next.
> 
> This doesn't build without those patches:

They are already on next. Do you want me to resend them as well?

> 
>    CC      drivers/regulator/lp87565-regulator.o
> drivers/regulator/lp87565-regulator.c:156:32: error: ‘LP87565_BUCK_3210’ undeclared here (not in a function); did you mean ‘LP87565_BUCK_10’?
>    LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
>                                  ^~~~~~~~~~~~~~~~~
> 

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
  2019-06-13 17:02     ` keerthy
  (?)
@ 2019-06-13 17:32     ` Mark Brown
  2019-06-13 18:09         ` keerthy
  -1 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2019-06-13 17:32 UTC (permalink / raw)
  To: keerthy; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo

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

On Thu, Jun 13, 2019 at 10:32:45PM +0530, keerthy wrote:
> On 6/13/2019 9:15 PM, Mark Brown wrote:
> > On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:

> > > patches 1/3 2/3 are already applied to linux-next.

> > This doesn't build without those patches:

> They are already on next. Do you want me to resend them as well?

That's no good, it still breaks the build of my tree.  I can't apply
this until the code is in my tree, either through a shared branch or
through Lihus' tree.  I see I acked the patch, I'll have been expecting
the patch to be applied to Lee's tree.  If that's not possible or
there's no branch then please resend after the merge window.

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

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
  2019-06-13 17:32     ` Mark Brown
@ 2019-06-13 18:09         ` keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: keerthy @ 2019-06-13 18:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo



On 6/13/2019 11:02 PM, Mark Brown wrote:
> On Thu, Jun 13, 2019 at 10:32:45PM +0530, keerthy wrote:
>> On 6/13/2019 9:15 PM, Mark Brown wrote:
>>> On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:
> 
>>>> patches 1/3 2/3 are already applied to linux-next.
> 
>>> This doesn't build without those patches:
> 
>> They are already on next. Do you want me to resend them as well?
> 
> That's no good, it still breaks the build of my tree.  I can't apply
> this until the code is in my tree, either through a shared branch or
> through Lihus' tree.  I see I acked the patch, I'll have been expecting
> the patch to be applied to Lee's tree.  If that's not possible or
> there's no branch then please resend after the merge window.

Lee Jones,

Could you please pull this patch?

- Keerthy
> 

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

* Re: [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support
@ 2019-06-13 18:09         ` keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: keerthy @ 2019-06-13 18:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: lee.jones, linux-kernel, linux-omap, t-kristo



On 6/13/2019 11:02 PM, Mark Brown wrote:
> On Thu, Jun 13, 2019 at 10:32:45PM +0530, keerthy wrote:
>> On 6/13/2019 9:15 PM, Mark Brown wrote:
>>> On Wed, Jun 12, 2019 at 08:16:20PM +0530, Keerthy wrote:
> 
>>>> patches 1/3 2/3 are already applied to linux-next.
> 
>>> This doesn't build without those patches:
> 
>> They are already on next. Do you want me to resend them as well?
> 
> That's no good, it still breaks the build of my tree.  I can't apply
> this until the code is in my tree, either through a shared branch or
> through Lihus' tree.  I see I acked the patch, I'll have been expecting
> the patch to be applied to Lee's tree.  If that's not possible or
> there's no branch then please resend after the merge window.

Lee Jones,

Could you please pull this patch?

- Keerthy
> 

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

* [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window
  2019-06-12 14:46 ` Keerthy
  (?)
  (?)
@ 2019-06-17  7:03 ` Lee Jones
  2019-06-17  7:15     ` Keerthy
  2019-07-02 10:46   ` [GIT PULL v2] " Lee Jones
  -1 siblings, 2 replies; 12+ messages in thread
From: Lee Jones @ 2019-06-17  7:03 UTC (permalink / raw)
  To: Keerthy; +Cc: broonie, linux-kernel, linux-omap, t-kristo

Enjoy!

The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:

  Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-regulator-v5.3

for you to fetch changes up to 7ee63bd74750a2c6fac31805ca0ac67f2522bfa5:

  regulator: lp87565: Add 4-phase lp87561 regulator support (2019-06-17 08:00:24 +0100)

----------------------------------------------------------------
Immutable branch between MFD and Regulator due for the v5.3 merge window

----------------------------------------------------------------
Keerthy (3):
      dt-bindings: mfd: lp87565: Add LP87561 configuration
      mfd: lp87565: Add support for 4-phase LP87561 combination
      regulator: lp87565: Add 4-phase lp87561 regulator support

 Documentation/devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++++++
 drivers/mfd/lp87565.c                             |  4 +++
 drivers/regulator/lp87565-regulator.c             | 17 ++++++++++-
 include/linux/mfd/lp87565.h                       |  2 ++
 4 files changed, 58 insertions(+), 1 deletion(-)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window
  2019-06-17  7:03 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window Lee Jones
@ 2019-06-17  7:15     ` Keerthy
  2019-07-02 10:46   ` [GIT PULL v2] " Lee Jones
  1 sibling, 0 replies; 12+ messages in thread
From: Keerthy @ 2019-06-17  7:15 UTC (permalink / raw)
  To: Lee Jones; +Cc: broonie, linux-kernel, linux-omap, t-kristo



On 17/06/19 12:33 PM, Lee Jones wrote:
> Enjoy!
> 
> The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:
> 
>    Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-regulator-v5.3
> 
> for you to fetch changes up to 7ee63bd74750a2c6fac31805ca0ac67f2522bfa5:
> 
>    regulator: lp87565: Add 4-phase lp87561 regulator support (2019-06-17 08:00:24 +0100)
> 
> ----------------------------------------------------------------
> Immutable branch between MFD and Regulator due for the v5.3 merge window
> 
> ----------------------------------------------------------------
> Keerthy (3):
>        dt-bindings: mfd: lp87565: Add LP87561 configuration
>        mfd: lp87565: Add support for 4-phase LP87561 combination
>        regulator: lp87565: Add 4-phase lp87561 regulator support

Thanks Lee Jones.

> 
>   Documentation/devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++++++
>   drivers/mfd/lp87565.c                             |  4 +++
>   drivers/regulator/lp87565-regulator.c             | 17 ++++++++++-
>   include/linux/mfd/lp87565.h                       |  2 ++
>   4 files changed, 58 insertions(+), 1 deletion(-)
> 

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

* Re: [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window
@ 2019-06-17  7:15     ` Keerthy
  0 siblings, 0 replies; 12+ messages in thread
From: Keerthy @ 2019-06-17  7:15 UTC (permalink / raw)
  To: Lee Jones; +Cc: broonie, linux-kernel, linux-omap, t-kristo



On 17/06/19 12:33 PM, Lee Jones wrote:
> Enjoy!
> 
> The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:
> 
>    Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-regulator-v5.3
> 
> for you to fetch changes up to 7ee63bd74750a2c6fac31805ca0ac67f2522bfa5:
> 
>    regulator: lp87565: Add 4-phase lp87561 regulator support (2019-06-17 08:00:24 +0100)
> 
> ----------------------------------------------------------------
> Immutable branch between MFD and Regulator due for the v5.3 merge window
> 
> ----------------------------------------------------------------
> Keerthy (3):
>        dt-bindings: mfd: lp87565: Add LP87561 configuration
>        mfd: lp87565: Add support for 4-phase LP87561 combination
>        regulator: lp87565: Add 4-phase lp87561 regulator support

Thanks Lee Jones.

> 
>   Documentation/devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++++++
>   drivers/mfd/lp87565.c                             |  4 +++
>   drivers/regulator/lp87565-regulator.c             | 17 ++++++++++-
>   include/linux/mfd/lp87565.h                       |  2 ++
>   4 files changed, 58 insertions(+), 1 deletion(-)
> 

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

* [GIT PULL v2] Immutable branch between MFD and Regulator due for the v5.3 merge window
  2019-06-17  7:03 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window Lee Jones
  2019-06-17  7:15     ` Keerthy
@ 2019-07-02 10:46   ` Lee Jones
  1 sibling, 0 replies; 12+ messages in thread
From: Lee Jones @ 2019-07-02 10:46 UTC (permalink / raw)
  To: Keerthy; +Cc: broonie, linux-kernel, linux-omap, t-kristo

Mark,

This is a subsequent pull which contains the /* fall-through */ fix.

Enjoy!

The following changes since commit a188339ca5a396acc588e5851ed7e19f66b0ebd9:

  Linux 5.2-rc1 (2019-05-19 15:47:09 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-regulator-v5.3-1

for you to fetch changes up to f3f4363b1239584efc1a22c5ca0f2308e5693c38:

  regulator: lp87565: Fix missing break in switch statement (2019-07-02 11:41:23 +0100)

----------------------------------------------------------------
Immutable branch between MFD and Regulator due for the v5.3 merge window

----------------------------------------------------------------
Colin Ian King (1):
      regulator: lp87565: Fix missing break in switch statement

Keerthy (3):
      dt-bindings: mfd: lp87565: Add LP87561 configuration
      mfd: lp87565: Add support for 4-phase LP87561 combination
      regulator: lp87565: Add 4-phase lp87561 regulator support

 Documentation/devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++++++
 drivers/mfd/lp87565.c                             |  4 +++
 drivers/regulator/lp87565-regulator.c             | 18 +++++++++++-
 include/linux/mfd/lp87565.h                       |  2 ++
 4 files changed, 59 insertions(+), 1 deletion(-)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2019-07-02 10:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 14:46 [RESEND PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support Keerthy
2019-06-12 14:46 ` Keerthy
2019-06-13 15:45 ` Mark Brown
2019-06-13 17:02   ` keerthy
2019-06-13 17:02     ` keerthy
2019-06-13 17:32     ` Mark Brown
2019-06-13 18:09       ` keerthy
2019-06-13 18:09         ` keerthy
2019-06-17  7:03 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window Lee Jones
2019-06-17  7:15   ` Keerthy
2019-06-17  7:15     ` Keerthy
2019-07-02 10:46   ` [GIT PULL v2] " Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.