Re: [PATCH 2/5] iio:bmi160: add drdy interrupt support

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

 



On 1/19/19 9:17 AM, Jonathan Cameron wrote:
On Sun, 13 Jan 2019 19:56:18 -0800
Martin Kelly <martin@xxxxxxxxxxxxxxxx> wrote:

From: Martin Kelly <martin@xxxxxxxxxxxxxxxx>

Add interrupt support for the data ready signal on the BMI160, which fires
an interrupt whenever new accelerometer/gyroscope data is ready to read.

Various minor comments inline.  Mostly fine, but one big 'oddity'.

I think we only ever request 1 irq, but we have support in here for
configuring the chip to generate two at the same time.  Doesn't make
much sense as it stands... Am I missing something?

Jonathan


Yeah, I initially wrote it not allowing for a "BOTH" mapping but added it afterwards in order to support what the hardware allows. However, thinking about it more, the hardware allows this so that you can map different types of interrupts onto the two pins. So, I agree with you that with just a DRDY interrupt, there's no reason for this mapping, so I've dropped it.

Thanks for the other comments; I have made all the changes you suggested and sent a v2. I also added a cleanup patch in the v2 to change the other invocations of "if (ret < 0)" to "if (ret)", as there were a number of them in the driver prior to this change.



[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