linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: linux-watchdog@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: [RFC 5/6] mfd: da9063: save i2c_client for later use
Date: Tue, 5 Jul 2016 15:22:22 +0200	[thread overview]
Message-ID: <1467724943-13416-6-git-send-email-s.christ@phytec.de> (raw)
In-Reply-To: <1467724943-13416-1-git-send-email-s.christ@phytec.de>

Save i2c_client for later use in watchdog restart handler. The regmap
interface cannot be used there.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
 drivers/mfd/da9063-i2c.c        | 1 +
 include/linux/mfd/da9063/core.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mfd/da9063-i2c.c b/drivers/mfd/da9063-i2c.c
index 6f3a7c0..c0f53d2 100644
--- a/drivers/mfd/da9063-i2c.c
+++ b/drivers/mfd/da9063-i2c.c
@@ -224,6 +224,7 @@ static int da9063_i2c_probe(struct i2c_client *i2c,
 	i2c_set_clientdata(i2c, da9063);
 	da9063->dev = &i2c->dev;
 	da9063->chip_irq = i2c->irq;
+	da9063->i2c = i2c;
 
 	if (da9063->variant_code == PMIC_DA9063_AD) {
 		da9063_regmap_config.rd_table = &da9063_ad_readable_table;
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h
index 79f4d82..1d1ae5d 100644
--- a/include/linux/mfd/da9063/core.h
+++ b/include/linux/mfd/da9063/core.h
@@ -83,6 +83,7 @@ struct da9063 {
 
 	/* Control interface */
 	struct regmap	*regmap;
+	struct i2c_client *i2c;
 
 	/* Interrupts */
 	int		chip_irq;
-- 
1.9.1

  parent reply	other threads:[~2016-07-05 13:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 13:22 [PATCH 0/6] Implement I2C restart handler Stefan Christ
2016-07-05 13:22 ` [RFC 1/6] watchdog: da9063_wdt: don't trigger watchdog too fast Stefan Christ
2016-07-05 15:33   ` Guenter Roeck
     [not found]     ` <577BD34F.7000804-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-07-06  8:42       ` Stefan Christ
2016-07-05 13:22 ` [RFC 2/6] watchdog: da9063_wdt: use delayed work to trigger Stefan Christ
2016-07-05 13:22 ` [RFC 3/6] i2c-imx: add blocking xfer function Stefan Christ
2016-07-05 13:22 ` Stefan Christ [this message]
     [not found] ` <1467724943-13416-1-git-send-email-s.christ-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-07-05 13:22   ` [RFC 4/6] i2c-core: add possibility to block an adapter for a single user Stefan Christ
2016-07-05 13:22   ` [RFC 6/6] watchdog: da9063_wdt: add schedule-free and race-free restart handler Stefan Christ
2016-07-05 15:37     ` Guenter Roeck
2016-07-05 14:58 ` [PATCH 0/6] Implement I2C " Wolfram Sang
2016-07-05 15:41   ` Guenter Roeck
2016-07-06  9:18   ` Stefan Christ
2016-07-06 14:16     ` Wolfram Sang

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=1467724943-13416-6-git-send-email-s.christ@phytec.de \
    --to=s.christ@phytec.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).