Linux Power Management development
 help / color / mirror / Atom feed
From: Liam Breck <liam@networkimprov.net>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, Mark Greer <mgreer@animalcreek.com>,
	Tony Lindgren <tony@atomide.com>,
	Liam Breck <kernel@networkimprov.net>
Subject: [PATCH v4 1/7] power: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
Date: Wed, 18 Jan 2017 09:26:48 -0800	[thread overview]
Message-ID: <20170118172654.19416-2-liam@networkimprov.net> (raw)
In-Reply-To: <20170118172654.19416-1-liam@networkimprov.net>

The interrupt signal is TRIGGER_FALLING. This is is specified in the
data sheet PIN FUNCTIONS: "The INT pin sends active low, 256us
pulse to host to report charger device status and fault."

Also the direction can be seen in the data sheet Figure 37 "BQ24190
with D+/D- Detection and USB On-The-Go (OTG)" which shows a 10k
pull-up resistor installed for the sample configurations.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 drivers/power/supply/bq24190_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 694c088..f5746b9 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -1394,7 +1394,7 @@ static int bq24190_probe(struct i2c_client *client,
 
 	ret = devm_request_threaded_irq(dev, bdi->irq, NULL,
 			bq24190_irq_handler_thread,
-			IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+			IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
 			"bq24190-charger", bdi);
 	if (ret < 0) {
 		dev_err(dev, "Can't set up irq handler\n");

  reply	other threads:[~2017-01-18 17:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17  2:28 [PATCH v3 0/6] BQ24190 charger fixes Liam Breck
2017-01-17  3:26 ` Sebastian Reichel
2017-01-17  6:01   ` Liam Breck
2017-01-17 17:06     ` Sebastian Reichel
2017-01-18 17:26 ` [PATCH v4 0/7] " Liam Breck
2017-01-18 17:26   ` Liam Breck [this message]
2017-01-18 17:26   ` [PATCH v4 2/7] power: bq24190_charger: Call set_mode_host() on pm_resume() Liam Breck
2017-01-18 17:26   ` [PATCH v4 3/7] power: bq24190_charger: Install irq_handler_thread() at end of probe() Liam Breck
2017-01-18 17:26   ` [PATCH v4 4/7] power: bq24190_charger: Adjust formatting Liam Breck
2017-01-18 17:26   ` [PATCH v4 5/7] power: bq24190_charger: Call power_supply_changed() for relevant component Liam Breck
2017-01-18 17:26   ` [PATCH v4 6/7] power: bq24190_charger: Don't read fault register outside irq_handle_thread() Liam Breck
2017-01-18 17:26   ` [PATCH v4 7/7] power: bq24190_charger: Handle fault before status on interrupt Liam Breck
2017-01-20 11:51   ` [PATCH v4 0/7] BQ24190 charger fixes Sebastian Reichel

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=20170118172654.19416-2-liam@networkimprov.net \
    --to=liam@networkimprov.net \
    --cc=kernel@networkimprov.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgreer@animalcreek.com \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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