[RFC 5/6] mfd: da9063: save i2c_client for later use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Stefan Christ <s.christ@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux