[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190321155601.GP9224@smile.fi.intel.com>
Date: Thu, 21 Mar 2019 17:56:01 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: intel_soc_pmic_bxtwc: Add device for the I2C master
On Thu, Mar 21, 2019 at 05:41:22PM +0300, Heikki Krogerus wrote:
> Intel WhiskeyCove PMIC has also I2C master interface that is
> designed to be used for controlling a discrete battery
> charger IC.
>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 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
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists