All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Anton Vorontsov <anton@enomsg.org>
Cc: Olof Johansson <olof@lixom.net>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	ajaykumar.rs@samsung.com, linux-samsung-soc@vger.kernel.org,
	Doug Anderson <dianders@chromium.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/5] mfd: tps65090: Don't tell child devices we have an IRQ if we don't
Date: Wed, 16 Apr 2014 11:25:20 -0700	[thread overview]
Message-ID: <1397672724-9063-2-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1397672724-9063-1-git-send-email-dianders@chromium.org>

If we weren't given an interrupt we shouldn't tell child devices (like
the tps65090 charger) that they have an interrupt.  This is needed so
that we can support polling mode in the tps65090 charger driver.

See also (charger: tps65090: Allow charger module to be used when no
irq).

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
---
Changes in v2:
- Split noirq (polling mode) changes into MFD and charger

 drivers/mfd/tps65090.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index ba1a25d..c3cddb4 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -64,11 +64,16 @@ static struct resource charger_resources[] = {
 	}
 };
 
-static const struct mfd_cell tps65090s[] = {
-	{
+enum tps65090_cells {
+	PMIC = 0,
+	CHARGER = 1,
+};
+
+static struct mfd_cell tps65090s[] = {
+	[PMIC] = {
 		.name = "tps65090-pmic",
 	},
-	{
+	[CHARGER] = {
 		.name = "tps65090-charger",
 		.num_resources = ARRAY_SIZE(charger_resources),
 		.resources = &charger_resources[0],
@@ -211,6 +216,9 @@ static int tps65090_i2c_probe(struct i2c_client *client,
 					"IRQ init failed with err: %d\n", ret);
 			return ret;
 		}
+	} else {
+		/* Don't tell children they have an IRQ that'll never fire */
+		tps65090s[CHARGER].num_resources = 0;
 	}
 
 	ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
-- 
1.9.1.423.g4596e3a


  reply	other threads:[~2014-04-16 18:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 20:14 [PATCH 0/3] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-15 20:14 ` [PATCH 1/3] mfd: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16  9:52   ` Lee Jones
2014-04-16 15:42     ` Doug Anderson
2014-04-16 16:26       ` Lee Jones
2014-04-16 17:45         ` Doug Anderson
2014-04-16 19:03           ` Lee Jones
2014-04-15 20:14 ` [PATCH 2/3] mfd: tps65090: Stop caching registers Doug Anderson
2014-04-16  9:59   ` Lee Jones
2014-04-16 10:13     ` Mark Brown
2014-04-16 18:27       ` Doug Anderson
2014-04-15 20:14 ` [PATCH 3/3] regulator: tps65090: Make FETs more reliable Doug Anderson
2014-04-15 22:52   ` Mark Brown
2014-04-15 22:52     ` Mark Brown
2014-04-16 18:28     ` Doug Anderson
2014-04-16 18:25 ` [PATCH v2 0/5] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-16 18:25   ` Doug Anderson [this message]
2014-04-16 18:25   ` [PATCH v2 2/5] charger: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16 18:25   ` [PATCH v2 3/5] mfd: tps65090: Stop caching most registers Doug Anderson
2014-04-16 18:25   ` [PATCH v2 4/5] regulator: tps65090: Allow setting the overcurrent wait time Doug Anderson
2014-04-16 20:33     ` Randy Dunlap
2014-04-16 23:12       ` Doug Anderson
2014-04-16 18:25   ` [PATCH v2 5/5] regulator: tps65090: Make FETs more reliable by adding retries Doug Anderson
2014-04-16 20:50     ` Simon Glass
2014-04-16 21:25       ` Doug Anderson
2014-04-16 23:24         ` Simon Glass
2014-04-16 20:51     ` Mark Brown
2014-04-16 21:34       ` Doug Anderson
2014-04-16 21:54         ` Mark Brown
2014-04-16 22:59           ` Doug Anderson

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=1397672724-9063-2-git-send-email-dianders@chromium.org \
    --to=dianders@chromium.org \
    --cc=ajaykumar.rs@samsung.com \
    --cc=anton@enomsg.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sachin.kamat@linaro.org \
    --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 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.