From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: <jic23@kernel.org>, <robh@kernel.org>, <conor+dt@kernel.org>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com>
Subject: [PATCH 4/6] iio: adc: ad4080: add support for AD4086
Date: Tue, 21 Oct 2025 10:53:46 +0000 [thread overview]
Message-ID: <20251021105349.21145-5-antoniu.miclaus@analog.com> (raw)
In-Reply-To: <20251021105349.21145-1-antoniu.miclaus@analog.com>
Add support for AD4086 14-bit SAR ADC. The AD4086 differs from
AD4080 in resolution (14-bit vs 20-bit) and LVDS CNV clock count
maximum (4 vs 7).
Changes:
- Add AD4086_CHIP_ID definition (0x0056)
- Create ad4086_channel with 14-bit resolution and 16-bit storage
- Add ad4086_chip_info with lvds_cnv_clk_cnt_max = 4
- Register AD4086 in device ID and OF match tables
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad4080.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
index e2cdca2e9174..d6d0688adc3d 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -129,6 +129,7 @@
#define AD4081_CHIP_ID 0x0051
#define AD4083_CHIP_ID 0x0053
#define AD4084_CHIP_ID 0x0054
+#define AD4086_CHIP_ID 0x0056
#define AD4080_LVDS_CNV_CLK_CNT_MAX 7
@@ -444,6 +445,8 @@ static const struct iio_chan_spec ad4083_channel = AD4080_CHANNEL_DEFINE(16, 16)
static const struct iio_chan_spec ad4084_channel = AD4080_CHANNEL_DEFINE(16, 16);
+static const struct iio_chan_spec ad4086_channel = AD4080_CHANNEL_DEFINE(14, 16);
+
static const struct ad4080_chip_info ad4080_chip_info = {
.name = "ad4080",
.product_id = AD4080_CHIP_ID,
@@ -484,6 +487,16 @@ static const struct ad4080_chip_info ad4084_chip_info = {
.lvds_cnv_clk_cnt_max = 2,
};
+static const struct ad4080_chip_info ad4086_chip_info = {
+ .name = "ad4086",
+ .product_id = AD4086_CHIP_ID,
+ .scale_table = ad4080_scale_table,
+ .num_scales = ARRAY_SIZE(ad4080_scale_table),
+ .num_channels = 1,
+ .channels = &ad4086_channel,
+ .lvds_cnv_clk_cnt_max = 4,
+};
+
static int ad4080_setup(struct iio_dev *indio_dev)
{
struct ad4080_state *st = iio_priv(indio_dev);
@@ -642,6 +655,7 @@ static const struct spi_device_id ad4080_id[] = {
{ "ad4081", (kernel_ulong_t)&ad4081_chip_info },
{ "ad4083", (kernel_ulong_t)&ad4083_chip_info },
{ "ad4084", (kernel_ulong_t)&ad4084_chip_info },
+ { "ad4086", (kernel_ulong_t)&ad4086_chip_info },
{ }
};
MODULE_DEVICE_TABLE(spi, ad4080_id);
@@ -651,6 +665,7 @@ static const struct of_device_id ad4080_of_match[] = {
{ .compatible = "adi,ad4081", &ad4081_chip_info },
{ .compatible = "adi,ad4083", &ad4083_chip_info },
{ .compatible = "adi,ad4084", &ad4084_chip_info },
+ { .compatible = "adi,ad4086", &ad4086_chip_info },
{ }
};
MODULE_DEVICE_TABLE(of, ad4080_of_match);
--
2.43.0
next prev parent reply other threads:[~2025-10-21 10:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 10:53 [PATCH 0/6] iio: adc: ad4080: add support for AD4083, AD4086, and AD4087 Antoniu Miclaus
2025-10-21 10:53 ` [PATCH 1/6] dt-bindings: iio: adc: adi,ad4080: add support for AD4083 Antoniu Miclaus
2025-10-21 10:53 ` [PATCH 2/6] iio: adc: ad4080: " Antoniu Miclaus
2025-10-21 10:53 ` [PATCH 3/6] dt-bindings: iio: adc: adi,ad4080: add support for AD4086 Antoniu Miclaus
2025-10-21 10:53 ` Antoniu Miclaus [this message]
2025-10-21 10:53 ` [PATCH 5/6] dt-bindings: iio: adc: adi,ad4080: add support for AD4087 Antoniu Miclaus
2025-10-21 10:53 ` [PATCH 6/6] iio: adc: ad4080: " Antoniu Miclaus
2025-10-22 18:02 ` [PATCH 0/6] iio: adc: ad4080: add support for AD4083, AD4086, and AD4087 Conor Dooley
2025-10-27 14:14 ` 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=20251021105349.21145-5-antoniu.miclaus@analog.com \
--to=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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