Re: [PATCH 1/2 v2] iio: st_sensors: support active-low interrupts

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

 




On 16/11/2015 14:20, Linus Walleij wrote:
> On Mon, Nov 16, 2015 at 12:14 PM, Giuseppe BARBA <giuseppe.barba@xxxxxx> wrote:
>> On 16/11/2015 09:58, Linus Walleij wrote:
>
>>> I am still missing a data sheet for the LSM303AGR sensor that
>>> Giuseppe added recently, so I have no idea what bits to poke to get
>>> active low IRQs (or open drain) on that sensor.
>>
>> I'm surprised that the datasheet is not available yet on
>> STMicroelectronics site. I've checked and it should be available in the
>> next days. I'll reply to you again  with the link.
>> Anyway, I can confirm you that the register 0x25 (mask 0x02) is the
>> correct one to use for setting interrupt active high/low.
>
> For the accelerometer I guessed it's the same as the other sensors,
> but as LSM303AGR also has DRDY for the magnetometer, I was
> wondering if there is a bit for IHL and OD also for the magnetometer
> side?

Yes, the interrupt polarity is also present for magnetometer.
This is namely IEA bit in the register CTRL_REG_M (0x63), bit 2 (mask 
0x04). Following the bit description:

Controls the polarity of the INT bit when an interrupt occurs.
Default: 0

If IEA = 0, then INT = 0 signals an interrupt
If IEA = 1, then INT = 1 signals an interrupt

This bit is present also for the other supported magnetometers.

Giuseppe.

>
> Yours,
> Linus Walleij
>��.n��������+%������w��{.n�����{��(��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[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