All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: inv_mpu6050: Make interrupt optional
Date: Fri, 26 Mar 2021 12:57:34 +0200	[thread overview]
Message-ID: <CAHp75VdK0rbM3ahDjjaQiZzjZ7Pm7wPV2Kkqv1SMo6c44nh46w@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VcHJrJyvdW9qCdCprrROozUuTb6EPP7DDMg3FSoY=Ch=A@mail.gmail.com>

On Fri, Mar 26, 2021 at 12:56 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Thu, Mar 25, 2021 at 3:12 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> >
> > The inv_mpu6050 driver requires an interrupt for buffered capture. But non
> > buffered reading for measurements works just fine without an interrupt
> > connected.
> >
> > Make the interrupt optional to support this case.
>
>
> > -       irq_type = irqd_get_trigger_type(desc);
> > -       if (!irq_type)
> > +               irq_type = irqd_get_trigger_type(desc);
> > +               if (!irq_type)
>
> A side note: perhaps change this to comparison with IRQ_TYPE_NONE (as
> a separate change)?

And use actually IRQ_TYPE and not IRQF (the values are the same but
semantics is different). I have seen that in many drivers :-(

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2021-03-26 10:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 13:10 [PATCH 1/2] iio: inv_mpu6050: Remove superfluous indio_dev->modes assignment Lars-Peter Clausen
2021-03-25 13:10 ` [PATCH 2/2] iio: inv_mpu6050: Make interrupt optional Lars-Peter Clausen
2021-03-25 14:39   ` Linus Walleij
2021-03-25 15:00     ` Lars-Peter Clausen
2021-03-26 10:56   ` Andy Shevchenko
2021-03-26 10:57     ` Andy Shevchenko [this message]
2021-03-26 19:52       ` Jean-Baptiste Maneyrol
2021-03-25 14:32 ` [PATCH 1/2] iio: inv_mpu6050: Remove superfluous indio_dev->modes assignment Linus Walleij
2021-03-25 17:10 ` Jean-Baptiste Maneyrol
2021-03-29 12:35 ` 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=CAHp75VdK0rbM3ahDjjaQiZzjZ7Pm7wPV2Kkqv1SMo6c44nh46w@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=jmaneyrol@invensense.com \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.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 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.