All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Palmas Bugfixes
@ 2012-06-22 12:36 Graeme Gregory
  2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Graeme Gregory @ 2012-06-22 12:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, lrg, broonie, s-guiriec

Hi, this patch series is three small bugfixes for the palmas MFD and
regulator device. These are essential for the correct operation of
the drivers and device.

Thanks

Graeme


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

* [PATCH 1/3] MFD: palmas fix regulator pdata missing
  2012-06-22 12:36 [PATCH 0/1] Palmas Bugfixes Graeme Gregory
@ 2012-06-22 12:36 ` Graeme Gregory
  2012-07-05 14:48   ` Samuel Ortiz
  2012-06-22 12:36 ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read Graeme Gregory
  2012-06-22 12:36 ` [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable Graeme Gregory
  2 siblings, 1 reply; 7+ messages in thread
From: Graeme Gregory @ 2012-06-22 12:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, lrg, broonie, s-guiriec, Graeme Gregory

Due to a merge error the section of code passing the pdata for the
regulator driver to the mfd_add_devices via the children structure
was missing. This corrects this problem.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
---
 drivers/mfd/palmas.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 00c0aba..7dfb018 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -441,6 +441,9 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
 		goto err;
 	}
 
+	children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata;
+	children[PALMAS_PMIC_ID].pdata_size = sizeof(*pdata->pmic_pdata);
+
 	ret = mfd_add_devices(palmas->dev, -1,
 			      children, ARRAY_SIZE(palmas_children),
 			      NULL, regmap_irq_chip_get_base(palmas->irq_data));
-- 
1.7.9.5


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

* [PATCH 2/3] MFD: add missing hunk to change irq to clear on read
  2012-06-22 12:36 [PATCH 0/1] Palmas Bugfixes Graeme Gregory
  2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
@ 2012-06-22 12:36 ` Graeme Gregory
  2012-07-05 14:49   ` Samuel Ortiz
  2012-06-22 12:36 ` [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable Graeme Gregory
  2 siblings, 1 reply; 7+ messages in thread
From: Graeme Gregory @ 2012-06-22 12:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, lrg, broonie, s-guiriec, Graeme Gregory

During conversion to regmap_irq this hunk was missing being moved
to MFD driver to put the chip into clear on read mode. Also as slave
is now set use it to determine which slave for the register call.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
---
 drivers/mfd/palmas.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 7dfb018..7ec7d8d 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -356,7 +356,14 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
 		}
 	}
 
-	ret = regmap_add_irq_chip(palmas->regmap[1], palmas->irq,
+	/* Change IRQ into clear on read mode for efficiency */
+	slave = PALMAS_BASE_TO_SLAVE(PALMAS_INTERRUPT_BASE);
+	addr = PALMAS_BASE_TO_REG(PALMAS_INTERRUPT_BASE, PALMAS_INT_CTRL);
+	reg = PALMAS_INT_CTRL_INT_CLEAR;
+
+	regmap_write(palmas->regmap[slave], addr, reg);
+
+	ret = regmap_add_irq_chip(palmas->regmap[slave], palmas->irq,
 			IRQF_ONESHOT | IRQF_TRIGGER_LOW, -1, &palmas_irq_chip,
 			&palmas->irq_data);
 	if (ret < 0)
-- 
1.7.9.5


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

* [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable
  2012-06-22 12:36 [PATCH 0/1] Palmas Bugfixes Graeme Gregory
  2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
  2012-06-22 12:36 ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read Graeme Gregory
@ 2012-06-22 12:36 ` Graeme Gregory
  2012-06-23 10:38   ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Graeme Gregory @ 2012-06-22 12:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, lrg, broonie, s-guiriec, Graeme Gregory

I forgot to apply the offsets for the regmap helper functions for
enable/disable on SMPS10 and the LDO regulators. This means regulators
will not enable/disable correctly.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Tested-by: Sebastien Guiriec <s-guiriec@ti.com>
---
 drivers/regulator/palmas-regulator.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 6c48511..7540c95 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -667,7 +667,9 @@ static __devinit int palmas_probe(struct platform_device *pdev)
 			pmic->desc[id].ops = &palmas_ops_smps10;
 			pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL;
 			pmic->desc[id].vsel_mask = SMPS10_VSEL;
-			pmic->desc[id].enable_reg = PALMAS_SMPS10_STATUS;
+			pmic->desc[id].enable_reg =
+					PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
+							PALMAS_SMPS10_STATUS);
 			pmic->desc[id].enable_mask = SMPS10_BOOST_EN;
 			pmic->desc[id].min_uV = 3750000;
 			pmic->desc[id].uV_step = 1250000;
@@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev)
 
 		pmic->desc[id].type = REGULATOR_VOLTAGE;
 		pmic->desc[id].owner = THIS_MODULE;
-		pmic->desc[id].enable_reg = palmas_regs_info[id].ctrl_addr;
+		pmic->desc[id].enable_reg = PALMAS_BASE_TO_REG(PALMAS_LDO_BASE,
+						palmas_regs_info[id].ctrl_addr);
 		pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE;
 
 		if (pdata && pdata->reg_data)
-- 
1.7.9.5


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

* Re: [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable
  2012-06-22 12:36 ` [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable Graeme Gregory
@ 2012-06-23 10:38   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2012-06-23 10:38 UTC (permalink / raw)
  To: Graeme Gregory; +Cc: linux-kernel, sameo, lrg, s-guiriec

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

On Fri, Jun 22, 2012 at 01:36:20PM +0100, Graeme Gregory wrote:
> I forgot to apply the offsets for the regmap helper functions for
> enable/disable on SMPS10 and the LDO regulators. This means regulators
> will not enable/disable correctly.

APPLIED, THANKS, after cleaning up the subject line.

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

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

* Re: [PATCH 1/3] MFD: palmas fix regulator pdata missing
  2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
@ 2012-07-05 14:48   ` Samuel Ortiz
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2012-07-05 14:48 UTC (permalink / raw)
  To: Graeme Gregory; +Cc: linux-kernel, lrg, broonie, s-guiriec

Hi Graeme,

On Fri, Jun 22, 2012 at 01:36:18PM +0100, Graeme Gregory wrote:
> Due to a merge error the section of code passing the pdata for the
> regulator driver to the mfd_add_devices via the children structure
> was missing. This corrects this problem.
> 
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> ---
>  drivers/mfd/palmas.c |    3 +++
>  1 file changed, 3 insertions(+)
Patch applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 2/3] MFD: add missing hunk to change irq to clear on read
  2012-06-22 12:36 ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read Graeme Gregory
@ 2012-07-05 14:49   ` Samuel Ortiz
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Ortiz @ 2012-07-05 14:49 UTC (permalink / raw)
  To: Graeme Gregory; +Cc: linux-kernel, lrg, broonie, s-guiriec

Hi Graeme,

On Fri, Jun 22, 2012 at 01:36:19PM +0100, Graeme Gregory wrote:
> During conversion to regmap_irq this hunk was missing being moved
> to MFD driver to put the chip into clear on read mode. Also as slave
> is now set use it to determine which slave for the register call.
> 
> Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> ---
>  drivers/mfd/palmas.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
Applied as well, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2012-07-05 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-22 12:36 [PATCH 0/1] Palmas Bugfixes Graeme Gregory
2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
2012-07-05 14:48   ` Samuel Ortiz
2012-06-22 12:36 ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read Graeme Gregory
2012-07-05 14:49   ` Samuel Ortiz
2012-06-22 12:36 ` [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable Graeme Gregory
2012-06-23 10:38   ` Mark Brown

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.