public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: John Stultz <john.stultz@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>,
	Feng Chen <puck.chen@hisilicon.com>,
	Wei Xu <xuwei5@hisilicon.com>, Guodong Xu <guodong.xu@linaro.org>
Subject: Re: [PATCH 4/4] mfd: hi655x-pmic: Add powerkey device to hi655x PMIC driver
Date: Wed, 15 Jun 2016 13:54:53 +0100	[thread overview]
Message-ID: <20160615125453.GI4948@dell> (raw)
In-Reply-To: <1465944212-17079-5-git-send-email-john.stultz@linaro.org>

On Tue, 14 Jun 2016, John Stultz wrote:

> Wire up the powerkey driver functionality for the hi655x PMIC.
> 
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Cc: Feng Chen <puck.chen@hisilicon.com>
> Cc: Wei Xu <xuwei5@hisilicon.com>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
> v4: Cleaned up magic values and realigned regulator entry to be
>     a onliner
> 
>  drivers/mfd/hi655x-pmic.c | 35 ++++++++++++++++++++++++++++++-----
>  1 file changed, 30 insertions(+), 5 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c
> index 072e6fe..e955a0c 100644
> --- a/drivers/mfd/hi655x-pmic.c
> +++ b/drivers/mfd/hi655x-pmic.c
> @@ -24,10 +24,6 @@
>  #include <linux/platform_device.h>
>  #include <linux/regmap.h>
>  
> -static const struct mfd_cell hi655x_pmic_devs[] = {
> -	{ .name = "hi655x-regulator", },
> -};
> -
>  static const struct regmap_irq hi655x_irqs[] = {
>  	{ .reg_offset = 0, .mask = OTMP_D1R_INT_MASK },
>  	{ .reg_offset = 0, .mask = VSYS_2P5_R_INT_MASK },
> @@ -56,6 +52,34 @@ static struct regmap_config hi655x_regmap_config = {
>  	.max_register = HI655X_BUS_ADDR(0xFFF),
>  };
>  
> +static struct resource pwrkey_resources[] = {
> +	{
> +		.name	= "down",
> +		.start	= PWRON_D20R_INT,
> +		.end	= PWRON_D20R_INT,
> +		.flags	= IORESOURCE_IRQ,
> +	}, {
> +		.name	= "up",
> +		.start	= PWRON_D20F_INT,
> +		.end	= PWRON_D20F_INT,
> +		.flags	= IORESOURCE_IRQ,
> +	}, {
> +		.name	= "hold 4s",
> +		.start	= PWRON_D4SR_INT,
> +		.end	= PWRON_D4SR_INT,
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};
> +
> +static const struct mfd_cell hi655x_pmic_devs[] = {
> +	{
> +		.name		= "hi65xx-powerkey",
> +		.num_resources	= ARRAY_SIZE(pwrkey_resources),
> +		.resources	= &pwrkey_resources[0],
> +	},
> +	{	.name		= "hi655x-regulator", },
> +};
> +
>  static void hi655x_local_irq_clear(struct regmap *map)
>  {
>  	int i;
> @@ -124,7 +148,8 @@ static int hi655x_pmic_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, pmic);
>  
>  	ret = mfd_add_devices(dev, PLATFORM_DEVID_AUTO, hi655x_pmic_devs,
> -			      ARRAY_SIZE(hi655x_pmic_devs), NULL, 0, NULL);
> +			      ARRAY_SIZE(hi655x_pmic_devs), NULL, 0,
> +			      regmap_irq_get_domain(pmic->irq_data));
>  	if (ret) {
>  		dev_err(dev, "Failed to register device %d\n", ret);
>  		regmap_del_irq_chip(gpio_to_irq(pmic->gpio), pmic->irq_data);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2016-06-15 12:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 22:43 [PATCH 0/4] Hi655x powerkey support for HiKey (v4) John Stultz
2016-06-14 22:43 ` [PATCH 1/4] drivers: input: powerkey for HISI 65xx SoC John Stultz
2016-06-22  0:06   ` John Stultz
2016-06-23  0:47     ` Dmitry Torokhov
2016-06-23 20:31       ` John Stultz
2016-06-23 20:40         ` Dmitry Torokhov
2016-06-23 20:47           ` Dmitry Torokhov
2016-06-23 20:54             ` John Stultz
2016-06-23 21:03               ` Dmitry Torokhov
2016-06-14 22:43 ` [PATCH 2/4] mfd: hi655x-pmic: Fixup issue with un-acked interrupts John Stultz
2016-06-15 12:54   ` Lee Jones
2016-06-14 22:43 ` [PATCH 3/4] mfd: hi655x-pmic: Rename some interrupt macro names John Stultz
2016-06-15 12:54   ` Lee Jones
2016-06-14 22:43 ` [PATCH 4/4] mfd: hi655x-pmic: Add powerkey device to hi655x PMIC driver John Stultz
2016-06-15 12:54   ` Lee Jones [this message]

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=20160615125453.GI4948@dell \
    --to=lee.jones@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=guodong.xu@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=jorge.ramirez-ortiz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=puck.chen@hisilicon.com \
    --cc=robh+dt@kernel.org \
    --cc=xuwei5@hisilicon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox