From: Jonathan Cameron <jic23@kernel.org>
To: Jagath Jog J <jagathjog1996@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio <linux-iio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] iio: accel: bma400: Add support for single and double tap events
Date: Sun, 19 Jun 2022 13:47:16 +0100 [thread overview]
Message-ID: <20220619134716.64292039@jic23-huawei> (raw)
In-Reply-To: <CAM+2EuJAyTL=JcESt8fteSy7q09nSShQKF0AMkiwdJOtHe5uPA@mail.gmail.com>
> >
> > ...
> >
> > > 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.
Perhaps make that obvious by calling it
tap_event_en_bitmask ?
next prev parent reply other threads:[~2022-06-19 12:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 19:17 [PATCH v1 0/2] iio: Add single and double tap events support Jagath Jog J
2022-06-13 19:17 ` [PATCH v1 1/2] iio: Add new event type gesture and use direction for single and double tap Jagath Jog J
2022-06-19 12:54 ` Jonathan Cameron
2022-06-26 13:21 ` Jagath Jog J
2022-07-16 14:56 ` Jonathan Cameron
2022-07-23 8:55 ` Jagath Jog J
2022-06-13 19:17 ` [PATCH v1 2/2] iio: accel: bma400: Add support for single and double tap events Jagath Jog J
2022-06-14 9:20 ` Andy Shevchenko
2022-06-14 19:18 ` Jagath Jog J
2022-06-19 12:47 ` Jonathan Cameron [this message]
2022-06-19 13:18 ` Jonathan Cameron
2022-06-26 13:23 ` Jagath Jog J
2022-07-16 15:20 ` Jonathan Cameron
2022-07-23 8:59 ` Jagath Jog J
2022-07-31 17:46 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220619134716.64292039@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=jagathjog1996@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).