[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190321144122.88484-1-heikki.krogerus@linux.intel.com>
Date: Thu, 21 Mar 2019 17:41:22 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] mfd: intel_soc_pmic_bxtwc: Add device for the I2C master
Intel WhiskeyCove PMIC has also I2C master interface that is
designed to be used for controlling a discrete battery
charger IC.
Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
---
drivers/mfd/intel_soc_pmic_bxtwc.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 03fe33882441..52885e2c0d85 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -84,6 +84,7 @@ enum bxtwc_irqs_adc {
enum bxtwc_irqs_chgr {
BXTWC_USBC_IRQ = 0,
+ BXTWC_I2C_IRQ,
BXTWC_CHGR0_IRQ,
BXTWC_CHGR1_IRQ,
};
@@ -121,7 +122,8 @@ static const struct regmap_irq bxtwc_regmap_irqs_adc[] = {
static const struct regmap_irq bxtwc_regmap_irqs_chgr[] = {
REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 0, 0x20),
- REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 0, 0x1f),
+ REGMAP_IRQ_REG(BXTWC_I2C_IRQ, 0, 0x0f),
+ REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 0, 0x10),
REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 1, 0x1f),
};
@@ -208,6 +210,10 @@ static struct resource usbc_resources[] = {
DEFINE_RES_IRQ(BXTWC_USBC_IRQ),
};
+static struct resource i2c_resources[] = {
+ DEFINE_RES_IRQ(BXTWC_I2C_IRQ),
+};
+
static struct resource charger_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "CHARGER"),
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR1_IRQ, "CHARGER1"),
@@ -241,6 +247,11 @@ static struct mfd_cell bxt_wc_dev[] = {
.num_resources = ARRAY_SIZE(usbc_resources),
.resources = usbc_resources,
},
+ {
+ .name = "bxt_wcove_i2c",
+ .num_resources = ARRAY_SIZE(i2c_resources),
+ .resources = i2c_resources,
+ },
{
.name = "bxt_wcove_ext_charger",
.num_resources = ARRAY_SIZE(charger_resources),
--
2.20.1
Powered by blists - more mailing lists