Re: [PATCH 2/2] iio: inv_mpu6050: Make interrupt optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 26, 2021 at 12:56 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Thu, Mar 25, 2021 at 3:12 PM Lars-Peter Clausen <lars@xxxxxxxxxx> 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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux