All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waqar Hameed <waqar.hameed@axis.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>, <kernel@axis.com>,
	<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 3/3] iio: Add driver for Nicera D3-323-AA PIR sensor
Date: Sun, 15 Jun 2025 00:05:53 +0200	[thread overview]
Message-ID: <pnd7c1enflq.fsf@axis.com> (raw)
In-Reply-To: <pndldqwiihi.fsf@axis.com> (Waqar Hameed's message of "Fri, 16 May 2025 19:16:25 +0200")

On Fri, May 16, 2025 at 19:16 +0200 Waqar Hameed <waqar.hameed@axis.com> wrote:

> On Sun, May 11, 2025 at 13:14 +0100 Jonathan Cameron <jic23@kernel.org> wrote:

[...]

>>> +
>>> +/*
>>> + * Register bitmap.
>>> + * For some reason the first bit is denoted as F37 in the datasheet, the second
>>> + * as F38 and so on. Note the gap between F60 and F64.
>>> + */
>>> +#define D3323AA_REG_BIT_SLAVEA1		0	/* F37. */
>>> +#define D3323AA_REG_BIT_SLAVEA2		1	/* F38. */
>>> +#define D3323AA_REG_BIT_SLAVEA3		2	/* F39. */
>>> +#define D3323AA_REG_BIT_SLAVEA4		3	/* F40. */
>>> +#define D3323AA_REG_BIT_SLAVEA5		4	/* F41. */
>>> +#define D3323AA_REG_BIT_SLAVEA6		5	/* F42. */
>>> +#define D3323AA_REG_BIT_SLAVEA7		6	/* F43. */
>>> +#define D3323AA_REG_BIT_SLAVEA8		7	/* F44. */
>>> +#define D3323AA_REG_BIT_SLAVEA9		8	/* F45. */
>> Perhaps these can be represented as masks using GENMASK() rather than
>> bits.  A lot of this will be hidden away if you follow suggesting to
>> only expose that you are using a bitmap to bitbang in the read/write
>> functions.
>
> Yes, that would be the natural thing to do when moving the bitmap stuff
> to the read/write functions (as answered below).

Since `bitmap_write()` needs an offset (and size), I didn't use
`GENMASK()` in v2 and thought it would be more clear this way. I'm still
open for suggestions though.

  parent reply	other threads:[~2025-06-14 22:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09 15:03 [PATCH 0/3] Add driver for Nicera D3-323-AA PIR sensor Waqar Hameed
2025-05-09 15:03 ` [PATCH 1/3] dt-bindings: vendor-prefixes: Add Nicera Waqar Hameed
2025-05-09 15:03 ` [PATCH 3/3] iio: Add driver for Nicera D3-323-AA PIR sensor Waqar Hameed
2025-05-11  7:57   ` Christophe JAILLET
2025-05-16 17:16     ` Waqar Hameed
2025-05-11 12:14   ` Jonathan Cameron
2025-05-16 17:16     ` Waqar Hameed
2025-05-18 17:38       ` Jonathan Cameron
2025-05-20 11:27         ` Waqar Hameed
2025-05-25  9:30           ` Jonathan Cameron
2025-05-27 14:48             ` Waqar Hameed
2025-05-31 15:10               ` Jonathan Cameron
2025-06-02 15:09                 ` Waqar Hameed
2025-06-14 22:05       ` Waqar Hameed [this message]
2025-05-09 15:03 ` [PATCH 2/3] dt-bindings: iio: proximity: Add " Waqar Hameed
2025-05-09 15:06   ` Krzysztof Kozlowski
2025-05-16 17:15     ` Waqar Hameed
2025-05-20  6:36       ` Krzysztof Kozlowski
2025-05-20 12:00         ` Waqar Hameed
2025-05-09 15:09 ` [PATCH 0/3] Add driver for " Krzysztof Kozlowski
2025-05-16 17:14   ` Waqar Hameed
  -- strict thread matches above, loose matches on Subject: below --
2025-06-14 21:56 Waqar Hameed
2025-06-14 21:56 ` [PATCH 3/3] iio: " Waqar Hameed

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=pnd7c1enflq.fsf@axis.com \
    --to=waqar.hameed@axis.com \
    --cc=jic23@kernel.org \
    --cc=kernel@axis.com \
    --cc=lars@metafoo.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.