lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] iio: accel: mma8452: improvements to handle multiple events
From
Date
>
> If rising: use transient OR ff_mt device-dependent like before. But
> now save it in a simple flag,
> whether transient registers are available.
Ok, is it good idea to add the flag to struct mma_chip_info like below?

* @mma_scales: scale factors for converting
register values
* to m/s^2; 3 modes: 2g, 4g, 8g; 2 integers
* per mode: m/s^2 and micro m/s^2
+ * @transient_supported: flag indicating whether chip support
transient
+ * event, as not all chips support
transient event
*/
struct mma_chip_info {
u8 chip_id;
const struct iio_chan_spec *channels;
int num_channels;
const int mma_scales[3][2];
+ bool transient_supported;
};

>
> If falling: switch to ff_mt in any case. (fixing freefall for the
> transient-devices)
ok sure.

Thanks,

Hari

On 08/21/2017 04:47 AM, Martin Kepplinger wrote:
>
> If rising: use transient OR ff_mt device-dependent like before. But
> now save it in a simple flag,
> whether transient registers are available.
>
> If falling: switch to ff_mt in any case. (fixing freefall for the
> transient-devices)

\
 
 \ /
  Last update: 2017-08-23 02:30    [W:0.077 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site