From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"David Jander" <david@protonic.nl>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v2 2/2] iio: adc: Add TI ADS131M0x ADC driver
Date: Thu, 13 Nov 2025 15:12:17 +0100 [thread overview]
Message-ID: <aRXnQZvyOLpYjg2i@pengutronix.de> (raw)
In-Reply-To: <CAHp75Vd9WCXR_QmefqPhWO1niMnESq7LAcN=eYvSiqkWfFrNhA@mail.gmail.com>
Hi Andy,
On Mon, Nov 10, 2025 at 10:46:02PM +0200, Andy Shevchenko wrote:
> > - Handles both input and output CRC; uses a non-reflected CCITT (0x1021)
> > implementation because the generic crc_ccitt helper is incompatible.
For the crc_ccitt() related part I wrote this comment ^^^ :) in the
commit message.
Anyways, after some more research, looks like crc_itu_t() should be used. It
seems to work.
> > +/* 24-bit resolution */
> > +#define ADS131M_RESOLUTION_BITS 24
> > +/* Divisor is 2^(Res - 1) for signed 2's complement */
> > +#define ADS131M_SCALE_DIVISOR (1UL << (ADS131M_RESOLUTION_BITS - 1))
>
> Why not BIT() here?
It's meant to signal an arithmetic calculation, BIT() is typically used
for a hardware bitmask or a flag. Should i still use BIT() here or there
is other way to describe it?
Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-11-13 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 6:14 [PATCH v2 0/2] iio: adc: Add support for TI ADS131M0x ADCs Oleksij Rempel
2025-11-10 6:14 ` [PATCH v2 1/2] bindings: iio: adc: Add bindings " Oleksij Rempel
2025-11-10 19:11 ` Conor Dooley
2025-11-10 6:14 ` [PATCH v2 2/2] iio: adc: Add TI ADS131M0x ADC driver Oleksij Rempel
2025-11-10 20:46 ` Andy Shevchenko
2025-11-13 14:12 ` Oleksij Rempel [this message]
2025-11-13 20:51 ` Andy Shevchenko
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=aRXnQZvyOLpYjg2i@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andy.shevchenko@gmail.com \
--cc=conor+dt@kernel.org \
--cc=david@protonic.nl \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@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).