regulator: lp87565: Add 4-phase lp87561 regulator support
PATCH RESEND v2 3/3 regulator: lp87565: Add 4-phase lp87561 regulator support
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
---
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(-)
drivers/regulator/lp87565-regulator.c +16 -1
@@ -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++) {
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 1 line · Keerthy
patches 1/3 2/3 are already applied to linux-next.
This doesn't build without those patches:
CC drivers/regulator/lp87565-regulator.odrivers/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",
^~~~~~~~~~~~~~~~~
Quoted 5 lines · Mark Brown
Quoted 1 line · Keerthy
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?
Quoted 6 lines
CC
drivers/regulator/lp87565-regulator.odrivers/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",^~~~~~~~~~~~~~~~~
Mark Brown
maintainerQuoted 8 lines · keerthy
Quoted 5 lines · Mark Brown
Quoted 1 line · Keerthy
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.
Quoted 8 lines · Mark Brown
Quoted 6 lines · keerthy
Quoted 5 lines · Mark Brown
Quoted 1 line · Keerthy
patches 1/3 2/3 are already applied to linux-next.
This doesn't build without those patches:
Quoted 7 lines
Quoted 1 line
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
Quoted 1 line
[GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window
In reply to KeerthyEnjoy!
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(-)
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [GIT PULL] Immutable branch between MFD and Regulator due for the v5.3 merge window
Quoted 14 lines · Lee Jones
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.gitib-mfd-regulator-v5.3for you to fetch changes up to
7ee63bd74750a2c6fac31805ca0ac67f2522bfa5:regulator: lp87565: Add 4-phase lp87561 regulator support (2019-06-17 08:00:24 +0100)
Quoted 8 lines
----------------------------------------------------------------
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.
Quoted 7 lines
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(-)
[GIT PULL v2] Immutable branch between MFD and Regulator due for the v5.3 merge window
In reply to Lee JonesMark,
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(-)
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog