lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM+2EuJAyTL=JcESt8fteSy7q09nSShQKF0AMkiwdJOtHe5uPA@mail.gmail.com>
Date:   Wed, 15 Jun 2022 00:48:11 +0530
From:   Jagath Jog J <jagathjog1996@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/2] iio: accel: bma400: Add support for single and
 double tap events

Hi Andy,

On Tue, Jun 14, 2022 at 2:50 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Mon, Jun 13, 2022 at 9:17 PM Jagath Jog J <jagathjog1996@...il.com> wrote:
> >
> > Add support for single and double tap events based on the tap threshold
> > value and minimum quiet time value between the taps. The INT1 pin is used
> > to interrupt and event is pushed to userspace.
>
> the event
>
> ...
>
> >  #include <linux/iio/trigger.h>
> >  #include <linux/iio/trigger_consumer.h>
> >  #include <linux/iio/triggered_buffer.h>
> > +#include <linux/iio/sysfs.h>
>
> s is before t

Sure I will arrange this in alphabetical order.

>
> ...
>
> >         bool step_event_en;
> >         bool activity_event_en;
> >         unsigned int generic_event_en;
> > +       unsigned int tap_event_en;
>
> Should it be boolean? Or i.o.w. why does it need to be an unsigned int?

tap_event_en is used as a bitmask. Bit 2 and 3 of tap_event_en
are used to tell the state of the single and double tap events.
For example bit 2 is used to indicate single tap is enabled or not.

set_mask_bits() and FIELD_GET()  is used to set and retrieve the
required bit value so I used unsigned int.



>
> ...
>
> > +       data->step_event_en = 0;
> > +       data->activity_event_en = 0;
>
> These are booleans.
>
> --
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ