From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C779C433EF for ; Sun, 19 Jun 2022 12:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235412AbiFSMiD (ORCPT ); Sun, 19 Jun 2022 08:38:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiFSMiC (ORCPT ); Sun, 19 Jun 2022 08:38:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C006477; Sun, 19 Jun 2022 05:38:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 618C961038; Sun, 19 Jun 2022 12:38:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98ADFC34114; Sun, 19 Jun 2022 12:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655642280; bh=UOBD3aWs3HXE75mbm1TrKnLQKoWVpswWnOcTLV2NNVA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lXsCtDriOQvPHoYjTkm7jflYt0G7QYg0euE17ssujQoJyia/Sd6MiidhMM1yoTI74 ymBH7KR9CG1AYfQukUZUn6Q1KMVBb94bohrRZQBx4tzT1jK/HEaO2r3Xra73hDoGVg dvqVl3LajdGiiE/rvVAScLOWrdjsDV6b4vg9RLiWuXkrFdZ5DGDmJzUJX1jV2e0tnN O7Wywl/5D3VGw4l6+3Yp7zfvQ++NuIGFxaO83gatRkJBFO945WXUp1nfMzgE2WrXKM 6eXgAVd+odf0eqmEyd/S6jC0hoZBf2mxTuhh+FdQ7AKtsbG88vL3DA+XFm+9HtEfEz QWYoEIAmJbbVQ== Date: Sun, 19 Jun 2022 13:47:16 +0100 From: Jonathan Cameron To: Jagath Jog J Cc: Andy Shevchenko , linux-iio , Linux Kernel Mailing List Subject: Re: [PATCH v1 2/2] iio: accel: bma400: Add support for single and double tap events Message-ID: <20220619134716.64292039@jic23-huawei> In-Reply-To: References: <20220613191706.31239-1-jagathjog1996@gmail.com> <20220613191706.31239-3-jagathjog1996@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org > > > > ... > > > > > 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 ?