From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Victor Chernyakin <chernyakin.victor.j@outlook.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 4/4] iio: cdc: add Texas Instruments FDC1004 driver
Date: Tue, 10 Nov 2026 23:18:05 +0200 [thread overview]
Message-ID: <avOKDbkkDwqhHEaC@ashevche-desk.local> (raw)
In-Reply-To: <SN1PR12MB2528B1D75F35447B0DF9A88CA5722@SN1PR12MB2528.namprd12.prod.outlook.com>
On Tue, Nov 10, 2026 at 02:24:22PM -0600, Victor Chernyakin wrote:
> The FDC1004 is a high-precision 4-channel capacitive sensor that talks
> over I2C. It can report the values of each of its 4 channels individually,
> as well as the difference between any two of them.
>
> This initial driver allows performing single reads and configuring
> the sensor's various settings (sample frequency, calibration
> gain/offset, etc.). It could be extended with support for triggered
> buffers, repeated measurement mode, and/or power management.
Basically a single nit-pick below (add a comment) and I'm totally fine with
this to go (we may polish it later on).
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
...
> +static const struct regmap_config fdc1004_regmap_config = {
> + .name = "fdc1004",
> + .reg_bits = 8,
> + .val_bits = 16,
Add a relatively short summary here as a comment on why the below is true.
> + .use_single_read = true,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
> + .max_register = FDC1004_REG_GAIN_CAL_CINn(3),
> + .rd_table = &fdc1004_readable_reg_table,
> + .wr_table = &fdc1004_writeable_reg_table,
> + .volatile_table = &fdc1004_volatile_reg_table,
> + .cache_type = REGCACHE_MAPLE,
> +};
...
> +static const int fdc1004_calibbias_decomposed[] = {
> + lower_32_bits(fdc1004_calibbias[0]), upper_32_bits(fdc1004_calibbias[0]),
> + lower_32_bits(fdc1004_calibbias[1]), upper_32_bits(fdc1004_calibbias[1]),
> + lower_32_bits(fdc1004_calibbias[2]), upper_32_bits(fdc1004_calibbias[2]),
> +};
> +
> +static const int fdc1004_calibscale_decomposed[] = {
> + lower_32_bits(fdc1004_calibscale[0]), upper_32_bits(fdc1004_calibscale[0]),
> + lower_32_bits(fdc1004_calibscale[1]), upper_32_bits(fdc1004_calibscale[1]),
> + lower_32_bits(fdc1004_calibscale[2]), upper_32_bits(fdc1004_calibscale[2]),
> +};
Can we prepare them dynamically at runtime? Use global variables and a macro
from once.h to make the populate function a singleton, so we don't have as many
copies as devices on the system that are driven by this code. We can probably
do this later, though.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-11-10 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 20:24 [PATCH v8 0/4] " Victor Chernyakin
2026-11-10 20:24 ` [PATCH v8 1/4] iio: prepare iio_format_value to handle higher-precision IIO_VAL_DECIMAL64_* formats Victor Chernyakin
2026-11-10 20:24 ` [PATCH v8 2/4] iio: add IIO_VAL_DECIMAL64_{ATTO,ZEPTO,YOCTO} formats Victor Chernyakin
2026-11-10 20:24 ` [PATCH v8 3/4] dt-bindings: iio: cdc: add Texas Instruments FDC1004 Victor Chernyakin
2026-11-10 20:24 ` [PATCH v8 4/4] iio: cdc: add Texas Instruments FDC1004 driver Victor Chernyakin
2026-11-10 21:18 ` Andy Shevchenko [this message]
2026-11-11 0:18 ` Victor Chernyakin
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=avOKDbkkDwqhHEaC@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=chernyakin.victor.j@outlook.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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
all inboxes | Powered by JetHome®