linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
	"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 1/5] mfd: axp20x: Use IRQF_TRIGGER_LOW on the axp288
Date: Tue, 3 Jan 2017 17:53:55 +0000	[thread overview]
Message-ID: <20170103175355.GG27589@dell> (raw)
In-Reply-To: <20161214135209.16369-1-hdegoede@redhat.com>

On Wed, 14 Dec 2016, Hans de Goede wrote:

> The interrupt line of the entire family of axp2xx pmics is active-low,
> for devicetree enumerated irqs, this is dealt with in the devicetree.
> 
> ACPI irq resources have a flag field for this too, I tried using this
> on my CUBE iwork8 Air tablet, but it does not contain the right data.
> 
> The dstd shows the irq listed as either ActiveLow or ActiveHigh,
> depending on the OSID variable, which seems to be set by the
> "OS IMAGE ID" in the BIOS/EFI setup screen.
> 
> Since the acpi-resource info is no good, simply pass in IRQF_TRIGGER_LOW
> on the axp288.
> 
> Together with the other axp288 fixes in this series, this fixes the axp288
> irq contineously triggering.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/mfd/axp20x.c       | 6 +++---
>  include/linux/mfd/axp20x.h | 1 +
>  2 files changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index ba130be..3d76941 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -800,6 +800,7 @@ int axp20x_match_device(struct axp20x_dev *axp20x)
>  		axp20x->nr_cells = ARRAY_SIZE(axp288_cells);
>  		axp20x->regmap_cfg = &axp288_regmap_config;
>  		axp20x->regmap_irq_chip = &axp288_regmap_irq_chip;
> +		axp20x->irq_flags = IRQF_TRIGGER_LOW;
>  		break;
>  	case AXP806_ID:
>  		axp20x->nr_cells = ARRAY_SIZE(axp806_cells);
> @@ -829,9 +830,8 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
>  	int ret;
>  
>  	ret = regmap_add_irq_chip(axp20x->regmap, axp20x->irq,
> -				  IRQF_ONESHOT | IRQF_SHARED, -1,
> -				  axp20x->regmap_irq_chip,
> -				  &axp20x->regmap_irqc);
> +			  IRQF_ONESHOT | IRQF_SHARED | axp20x->irq_flags,
> +			   -1, axp20x->regmap_irq_chip, &axp20x->regmap_irqc);
>  	if (ret) {
>  		dev_err(axp20x->dev, "failed to add irq chip: %d\n", ret);
>  		return ret;
> diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
> index fec597f..199cce3 100644
> --- a/include/linux/mfd/axp20x.h
> +++ b/include/linux/mfd/axp20x.h
> @@ -517,6 +517,7 @@ enum axp809_irqs {
>  struct axp20x_dev {
>  	struct device			*dev;
>  	int				irq;
> +	unsigned long			irq_flags;
>  	struct regmap			*regmap;
>  	struct regmap_irq_chip_data	*regmap_irqc;
>  	long				variant;

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

      parent reply	other threads:[~2017-01-03 17:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 13:52 [PATCH 1/5] mfd: axp20x: Use IRQF_TRIGGER_LOW on the axp288 Hans de Goede
2016-12-14 13:52 ` [PATCH 2/5] mfd: axp20x: Add missing axp288 irqs Hans de Goede
2016-12-14 14:21   ` Chen-Yu Tsai
2017-01-03 17:54   ` Lee Jones
2016-12-14 13:52 ` [PATCH 3/5] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Hans de Goede
2016-12-14 14:28   ` Chen-Yu Tsai
2017-01-03 17:54   ` Lee Jones
2016-12-14 13:52 ` [PATCH 4/5] mfd: axp20x: Drop wrong AXP288_PMIC_ADC_EN define Hans de Goede
2016-12-14 14:29   ` Chen-Yu Tsai
2017-01-03 17:54   ` Lee Jones
2016-12-14 13:52 ` [PATCH 5/5] mfd: axp20x: Fix axp288 volatile ranges Hans de Goede
2016-12-14 14:41   ` Chen-Yu Tsai
2016-12-14 15:07     ` Hans de Goede
2016-12-15 15:44     ` Hans de Goede
2016-12-14 14:19 ` [PATCH 1/5] mfd: axp20x: Use IRQF_TRIGGER_LOW on the axp288 Chen-Yu Tsai
2017-01-03 17:53 ` 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=20170103175355.GG27589@dell \
    --to=lee.jones@linaro.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=russianneuromancer@ya.ru \
    --cc=wens@csie.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).