mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Graeme Gregory <gg@slimlogic.co.uk>
To: linux-kernel@vger.kernel.org
Cc: sameo@linux.intel.com, lrg@ti.com,
	broonie@opensource.wolfsonmicro.com, s-guiriec@ti.com,
	Graeme Gregory <gg@slimlogic.co.uk>
Subject: [PATCH 2/3] MFD: add missing hunk to change irq to clear on read
Date: Fri, 22 Jun 2012 13:36:19 +0100	[thread overview]
Message-ID: <1340368581-11882-3-git-send-email-gg@slimlogic.co.uk> (raw)
In-Reply-To: <1340368581-11882-1-git-send-email-gg@slimlogic.co.uk>

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


  parent reply	other threads:[~2012-06-22 12:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Graeme Gregory [this message]
2012-07-05 14:49   ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340368581-11882-3-git-send-email-gg@slimlogic.co.uk \
    --to=gg@slimlogic.co.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=s-guiriec@ti.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®