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

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

 



Hello,

looks good, thanks for the patch.
Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@xxxxxxxxxxxxxx>

With this patch, we can only use polling when there is no interrupt. If we want to use another trigger (like a timer, it would be interesting), we would need to keep the buffer in the device.

But this would be better in a separate patch.

Thanks,
JB


From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Sent: Friday, March 26, 2021 11:57
To: Lars-Peter Clausen <lars@xxxxxxxxxx>
Cc: Jonathan Cameron <jic23@xxxxxxxxxx>; Jean-Baptiste Maneyrol <JManeyrol@xxxxxxxxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>; linux-iio <linux-iio@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] iio: inv_mpu6050: Make interrupt optional 
 
 CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.

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