public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: s2mps11: Fixup missing commas
@ 2012-07-12  1:35 Axel Lin
  2012-07-12  1:37 ` [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Axel Lin @ 2012-07-12  1:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/s2mps11.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 514cf54..da8c3d1 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -88,7 +88,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_LDO_STEP1,		\
 	.n_voltages	= S2MPS11_LDO_N_VOLTAGES,	\
 	.vsel_reg	= S2MPS11_REG_L1CTRL + num - 1,	\
-	.vsel_mask	= S2MPS11_LDO_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_LDO_VSEL_MASK,	\
 	.enable_reg	= S2MPS11_REG_L1CTRL + num - 1,	\
 	.enable_mask	= S2MPS11_ENABLE_MASK		\
 }
@@ -102,7 +102,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_LDO_STEP2,		\
 	.n_voltages	= S2MPS11_LDO_N_VOLTAGES,	\
 	.vsel_reg	= S2MPS11_REG_L1CTRL + num - 1,	\
-	.vsel_mask	= S2MPS11_LDO_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_LDO_VSEL_MASK,	\
 	.enable_reg	= S2MPS11_REG_L1CTRL + num - 1,	\
 	.enable_mask	= S2MPS11_ENABLE_MASK		\
 }
@@ -117,7 +117,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_BUCK_STEP1,			\
 	.n_voltages	= S2MPS11_BUCK_N_VOLTAGES,		\
 	.vsel_reg	= S2MPS11_REG_B1CTRL2 + (num - 1) * 2,	\
-	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK,		\
 	.enable_reg	= S2MPS11_REG_B1CTRL1 + (num - 1) * 2,	\
 	.enable_mask	= S2MPS11_ENABLE_MASK			\
 }
@@ -132,7 +132,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_BUCK_STEP1,			\
 	.n_voltages	= S2MPS11_BUCK_N_VOLTAGES,		\
 	.vsel_reg	= S2MPS11_REG_B5CTRL2,			\
-	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK,		\
 	.enable_reg	= S2MPS11_REG_B5CTRL1,			\
 	.enable_mask	= S2MPS11_ENABLE_MASK			\
 }
@@ -147,7 +147,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_BUCK_STEP1,			\
 	.n_voltages	= S2MPS11_BUCK_N_VOLTAGES,		\
 	.vsel_reg	= S2MPS11_REG_B6CTRL2 + (num - 6) * 2,	\
-	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK,		\
 	.enable_reg	= S2MPS11_REG_B6CTRL1 + (num - 6) * 2,	\
 	.enable_mask	= S2MPS11_ENABLE_MASK			\
 }
@@ -162,7 +162,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_BUCK_STEP3,			\
 	.n_voltages	= S2MPS11_BUCK_N_VOLTAGES,		\
 	.vsel_reg	= S2MPS11_REG_B9CTRL2,			\
-	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK,		\
 	.enable_reg	= S2MPS11_REG_B9CTRL1,			\
 	.enable_mask	= S2MPS11_ENABLE_MASK			\
 }
@@ -177,7 +177,7 @@ static struct regulator_ops s2mps11_buck_ops = {
 	.uV_step	= S2MPS11_BUCK_STEP2,			\
 	.n_voltages	= S2MPS11_BUCK_N_VOLTAGES,		\
 	.vsel_reg	= S2MPS11_REG_B9CTRL2,			\
-	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK		\
+	.vsel_mask	= S2MPS11_BUCK_VSEL_MASK,		\
 	.enable_reg	= S2MPS11_REG_B9CTRL1,			\
 	.enable_mask	= S2MPS11_ENABLE_MASK			\
 }
-- 
1.7.9.5




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

* [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev
  2012-07-12  1:35 [PATCH 1/3] regulator: s2mps11: Fixup missing commas Axel Lin
@ 2012-07-12  1:37 ` Axel Lin
  2012-07-12  2:25   ` Sangbeom Kim
  2012-07-12  1:39 ` [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff Axel Lin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2012-07-12  1:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel

Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL.
This patch fixes the settings for config.dev.
Current code does not need the *dev and *iodev of struct s2mps11_info,
so remove them.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/s2mps11.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index da8c3d1..b3c2705 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -24,8 +24,6 @@
 #include <linux/mfd/samsung/s2mps11.h>
 
 struct s2mps11_info {
-	struct device *dev;
-	struct sec_pmic_dev *iodev;
 	struct regulator_dev **rdev;
 
 	int ramp_delay2;
@@ -260,8 +258,6 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 	}
 
 	rdev = s2mps11->rdev;
-	config.dev = &pdev->dev;
-	config.regmap = iodev->regmap;
 	platform_set_drvdata(pdev, s2mps11);
 
 	s2mps11->ramp_delay2 = pdata->buck2_ramp_delay;
@@ -284,7 +280,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 			ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6;
 		if (s2mps11->buck3_ramp || s2mps11->buck4_ramp)
 			ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4;
-		sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP,
+		sec_reg_update(iodev, S2MPS11_REG_RAMP,
 			ramp_reg | ramp_enable, 0xff);
 	}
 
@@ -293,11 +289,11 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4;
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2;
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9);
-	sec_reg_update(s2mps11->iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff);
+	sec_reg_update(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff);
 
 	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
 
-		config.dev = s2mps11->dev;
+		config.dev = &pdev->dev;
 		config.regmap = iodev->regmap;
 		config.init_data = pdata->regulators[i].initdata;
 		config.driver_data = s2mps11;
@@ -305,8 +301,8 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 		rdev[i] = regulator_register(&regulators[i], &config);
 		if (IS_ERR(rdev[i])) {
 			ret = PTR_ERR(rdev[i]);
-			dev_err(s2mps11->dev, "regulator init failed for %d\n",
-					i);
+			dev_err(&pdev->dev, "regulator init failed for %d\n",
+				i);
 			rdev[i] = NULL;
 			goto err;
 		}
-- 
1.7.9.5




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

* [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff
  2012-07-12  1:35 [PATCH 1/3] regulator: s2mps11: Fixup missing commas Axel Lin
  2012-07-12  1:37 ` [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev Axel Lin
@ 2012-07-12  1:39 ` Axel Lin
  2012-07-12  2:26   ` Sangbeom Kim
  2012-07-12  2:23 ` [PATCH 1/3] regulator: s2mps11: Fixup missing commas Sangbeom Kim
  2012-07-12 17:07 ` Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2012-07-12  1:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/s2mps11.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index b3c2705..4669dc9 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -280,8 +280,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 			ramp_reg |= get_ramp_delay(s2mps11->ramp_delay2) >> 6;
 		if (s2mps11->buck3_ramp || s2mps11->buck4_ramp)
 			ramp_reg |= get_ramp_delay(s2mps11->ramp_delay34) >> 4;
-		sec_reg_update(iodev, S2MPS11_REG_RAMP,
-			ramp_reg | ramp_enable, 0xff);
+		sec_reg_write(iodev, S2MPS11_REG_RAMP, ramp_reg | ramp_enable);
 	}
 
 	ramp_reg &= 0x00;
@@ -289,7 +288,7 @@ static __devinit int s2mps11_pmic_probe(struct platform_device *pdev)
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay16) >> 4;
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay7810) >> 2;
 	ramp_reg |= get_ramp_delay(s2mps11->ramp_delay9);
-	sec_reg_update(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg, 0xff);
+	sec_reg_write(iodev, S2MPS11_REG_RAMP_BUCK, ramp_reg);
 
 	for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) {
 
-- 
1.7.9.5




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

* RE: [PATCH 1/3] regulator: s2mps11: Fixup missing commas
  2012-07-12  1:35 [PATCH 1/3] regulator: s2mps11: Fixup missing commas Axel Lin
  2012-07-12  1:37 ` [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev Axel Lin
  2012-07-12  1:39 ` [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff Axel Lin
@ 2012-07-12  2:23 ` Sangbeom Kim
  2012-07-12 17:07 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Sangbeom Kim @ 2012-07-12  2:23 UTC (permalink / raw)
  To: 'Axel Lin', 'Mark Brown'
  Cc: 'Liam Girdwood', linux-kernel

Hi!
On Thursday, July 12, 2012 10:36 AM +0900, Axel Lin wrote:

> Signed-off-by: Axel Lin <axel.lin@gmail.com>

S2mps11 regulator patch is based on mfd/for-next branch.
On mfd/for-next branch, Some regulator features didn't apply 
like a set_voltage_time_sel.
So, I didn't add some feature like a set_voltage_time_sel, vsel_mask.
Before send patch, I just added that. 
Anyway, It's my mistake.

Acked-by: Sangbeom Kim <sbkim73@samsung.com>

Thanks,
Sangbeom.


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

* RE: [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev
  2012-07-12  1:37 ` [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev Axel Lin
@ 2012-07-12  2:25   ` Sangbeom Kim
  0 siblings, 0 replies; 7+ messages in thread
From: Sangbeom Kim @ 2012-07-12  2:25 UTC (permalink / raw)
  To: 'Axel Lin', 'Mark Brown'
  Cc: 'Liam Girdwood', linux-kernel

Hi,
On Thursday, July 12, 2012 10:38 AM +0900, Axel Lin wrote:
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Sangbeom Kim <sbkim73@samsung.com>

Thanks,
Sangbeom.


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

* RE: [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff
  2012-07-12  1:39 ` [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff Axel Lin
@ 2012-07-12  2:26   ` Sangbeom Kim
  0 siblings, 0 replies; 7+ messages in thread
From: Sangbeom Kim @ 2012-07-12  2:26 UTC (permalink / raw)
  To: 'Axel Lin', 'Mark Brown'
  Cc: 'Liam Girdwood', linux-kernel

Hi,
On Thursday, July 12, 2012 10:39 AM +0900, Axel Lin wrote:
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Sangbeom Kim <sbkim73@samsung.com>

Thanks,
Sangbeom.


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

* Re: [PATCH 1/3] regulator: s2mps11: Fixup missing commas
  2012-07-12  1:35 [PATCH 1/3] regulator: s2mps11: Fixup missing commas Axel Lin
                   ` (2 preceding siblings ...)
  2012-07-12  2:23 ` [PATCH 1/3] regulator: s2mps11: Fixup missing commas Sangbeom Kim
@ 2012-07-12 17:07 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2012-07-12 17:07 UTC (permalink / raw)
  To: Axel Lin; +Cc: Sangbeom Kim, Liam Girdwood, linux-kernel

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

On Thu, Jul 12, 2012 at 09:35:50AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied all, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-07-12 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12  1:35 [PATCH 1/3] regulator: s2mps11: Fixup missing commas Axel Lin
2012-07-12  1:37 ` [PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev Axel Lin
2012-07-12  2:25   ` Sangbeom Kim
2012-07-12  1:39 ` [PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff Axel Lin
2012-07-12  2:26   ` Sangbeom Kim
2012-07-12  2:23 ` [PATCH 1/3] regulator: s2mps11: Fixup missing commas Sangbeom Kim
2012-07-12 17:07 ` Mark Brown

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