All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	<linux-iio@vger.kernel.org>, Martin Kelly <mkelly@xevo.com>,
	Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Subject: Re: [PATCH 4.18 REGRESSION fix] iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines
Date: Fri, 22 Jun 2018 15:18:27 +0100	[thread overview]
Message-ID: <20180622151827.00006396@huawei.com> (raw)
In-Reply-To: <20180618160936.6471-1-hdegoede@redhat.com>

On Mon, 18 Jun 2018 18:09:36 +0200
Hans de Goede <hdegoede@redhat.com> wrote:

> Commit 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
> causes inv_mpu_core_probe() to fail if the IRQ does not have a
> trigger-type setup.
> 
> This happens on machines where the mpu6050 is enumerated through ACPI and
> an older Interrupt type ACPI resource is used for the interrupt, rather
> then a GpioInt type type, causing the mpu6050 driver to no longer work
> there. This happens on e.g. the Asus T100TA.
> 
> This commits makes the mpu6050 fallback to the old IRQF_TRIGGER_RISING
> default if the irq-type is not setup, fixing this.
> 
> Fixes: 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
> Cc: Martin Kelly <mkelly@xevo.com>
> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Sorry for the delay - traveling this week.  Will pick this up over the weekend
once I'm back home.

J

> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> index f9c0624505a2..42618fe4f83e 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> @@ -959,6 +959,8 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,
>  	}
>  
>  	irq_type = irqd_get_trigger_type(desc);
> +	if (!irq_type)
> +		irq_type = IRQF_TRIGGER_RISING;
>  	if (irq_type == IRQF_TRIGGER_RISING)
>  		st->irq_mask = INV_MPU6050_ACTIVE_HIGH;
>  	else if (irq_type == IRQF_TRIGGER_FALLING)



  parent reply	other threads:[~2018-06-22 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 16:09 [PATCH 4.18 REGRESSION fix] iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines Hans de Goede
2018-06-18 16:44 ` Martin Kelly
2018-06-19  7:44 ` Jean-Baptiste Maneyrol
2018-06-22 14:18 ` Jonathan Cameron [this message]
2018-06-24 13:52   ` Jonathan Cameron

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=20180622151827.00006396@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=hdegoede@redhat.com \
    --cc=jic23@kernel.org \
    --cc=jmaneyrol@invensense.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=mkelly@xevo.com \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.