Re: [PATCH 1/3] regulator: s2mpxxx: Move regulator min/step voltages in common place

2014-07-14 Thread Krzysztof Kozlowski

On 08.07.2014 14:27, Amit Daniel Kachhap wrote:

This is a cleanup patch and moves min/step voltages in a common samsung
header file so that they can be used by other s2mpxxx PMIC drivers. Only
few required macros are added currently and others can be added if needed.

Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com
---
  drivers/regulator/s2mpa01.c | 32 
  drivers/regulator/s2mps11.c | 50 ++---
  include/linux/mfd/samsung/core.h| 21 
  include/linux/mfd/samsung/s2mpa01.h | 12 -
  include/linux/mfd/samsung/s2mps11.h |  9 ---
  include/linux/mfd/samsung/s2mps14.h | 10 
  6 files changed, 62 insertions(+), 72 deletions(-)



Hi,

Looks good.

Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com

Best regards,
Krzysztof


diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index ee83b48..962c5f1 100644
--- a/drivers/regulator/s2mpa01.c
+++ b/drivers/regulator/s2mpa01.c
@@ -241,8 +241,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_ldo_ops, \
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_LDO_MIN,  \
-   .uV_step= S2MPA01_LDO_STEP1,\
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_50_MV,   \
.n_voltages = S2MPA01_LDO_N_VOLTAGES,   \
.vsel_reg   = S2MPA01_REG_L1CTRL + num - 1, \
.vsel_mask  = S2MPA01_LDO_VSEL_MASK,\
@@ -255,8 +255,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_ldo_ops, \
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_LDO_MIN,  \
-   .uV_step= S2MPA01_LDO_STEP2,\
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_25_MV,   \
.n_voltages = S2MPA01_LDO_N_VOLTAGES,   \
.vsel_reg   = S2MPA01_REG_L1CTRL + num - 1, \
.vsel_mask  = S2MPA01_LDO_VSEL_MASK,\
@@ -270,8 +270,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN1,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_600_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B1CTRL2 + (num - 1) * 2,  \
@@ -286,8 +286,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN2,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B5CTRL2,  \
@@ -302,8 +302,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN1,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_600_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B6CTRL2 + (num - 6) * 2,  \
@@ -318,8 +318,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN2,\
-   .uV_step= S2MPA01_BUCK_STEP2,   \
+   .min_uV = MIN_800_MV,   \
+   .uV_step 

Re: [PATCH 1/3] regulator: s2mpxxx: Move regulator min/step voltages in common place

2014-07-09 Thread Mark Brown
On Tue, Jul 08, 2014 at 05:57:58PM +0530, Amit Daniel Kachhap wrote:

  include/linux/mfd/samsung/core.h| 21 
  include/linux/mfd/samsung/s2mpa01.h | 12 -
  include/linux/mfd/samsung/s2mps11.h |  9 ---
  include/linux/mfd/samsung/s2mps14.h | 10 

You need to send patches to the MFD subsystem to the MFD maintainers as
well.


signature.asc
Description: Digital signature


Re: [PATCH 1/3] regulator: s2mpxxx: Move regulator min/step voltages in common place

2014-07-09 Thread amit daniel kachhap
On Wed, Jul 9, 2014 at 2:55 PM, Mark Brown broo...@kernel.org wrote:
 On Tue, Jul 08, 2014 at 05:57:58PM +0530, Amit Daniel Kachhap wrote:

  include/linux/mfd/samsung/core.h| 21 
  include/linux/mfd/samsung/s2mpa01.h | 12 -
  include/linux/mfd/samsung/s2mps11.h |  9 ---
  include/linux/mfd/samsung/s2mps14.h | 10 

 You need to send patches to the MFD subsystem to the MFD maintainers as
 well.

Thanks for the pointer. Will submit to MFD maintainers.
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] regulator: s2mpxxx: Move regulator min/step voltages in common place

2014-07-08 Thread Amit Daniel Kachhap
This is a cleanup patch and moves min/step voltages in a common samsung
header file so that they can be used by other s2mpxxx PMIC drivers. Only
few required macros are added currently and others can be added if needed.

Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com
---
 drivers/regulator/s2mpa01.c | 32 
 drivers/regulator/s2mps11.c | 50 ++---
 include/linux/mfd/samsung/core.h| 21 
 include/linux/mfd/samsung/s2mpa01.h | 12 -
 include/linux/mfd/samsung/s2mps11.h |  9 ---
 include/linux/mfd/samsung/s2mps14.h | 10 
 6 files changed, 62 insertions(+), 72 deletions(-)

diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index ee83b48..962c5f1 100644
--- a/drivers/regulator/s2mpa01.c
+++ b/drivers/regulator/s2mpa01.c
@@ -241,8 +241,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_ldo_ops, \
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_LDO_MIN,  \
-   .uV_step= S2MPA01_LDO_STEP1,\
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_50_MV,   \
.n_voltages = S2MPA01_LDO_N_VOLTAGES,   \
.vsel_reg   = S2MPA01_REG_L1CTRL + num - 1, \
.vsel_mask  = S2MPA01_LDO_VSEL_MASK,\
@@ -255,8 +255,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_ldo_ops, \
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_LDO_MIN,  \
-   .uV_step= S2MPA01_LDO_STEP2,\
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_25_MV,   \
.n_voltages = S2MPA01_LDO_N_VOLTAGES,   \
.vsel_reg   = S2MPA01_REG_L1CTRL + num - 1, \
.vsel_mask  = S2MPA01_LDO_VSEL_MASK,\
@@ -270,8 +270,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN1,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_600_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B1CTRL2 + (num - 1) * 2,  \
@@ -286,8 +286,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN2,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B5CTRL2,  \
@@ -302,8 +302,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN1,\
-   .uV_step= S2MPA01_BUCK_STEP1,   \
+   .min_uV = MIN_600_MV,   \
+   .uV_step= STEP_6_25_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,   \
.vsel_reg   = S2MPA01_REG_B6CTRL2 + (num - 6) * 2,  \
@@ -318,8 +318,8 @@ static struct regulator_ops s2mpa01_buck_ops = {
.ops= s2mpa01_buck_ops,\
.type   = REGULATOR_VOLTAGE,\
.owner  = THIS_MODULE,  \
-   .min_uV = S2MPA01_BUCK_MIN2,\
-   .uV_step= S2MPA01_BUCK_STEP2,   \
+   .min_uV = MIN_800_MV,   \
+   .uV_step= STEP_12_5_MV, \
.n_voltages = S2MPA01_BUCK_N_VOLTAGES,  \
.ramp_delay = S2MPA01_RAMP_DELAY,