Add support for AD4088 14-bit SAR ADC. The AD4088 has the same
resolution as AD4087 (14-bit) but differs in LVDS CNV clock count
maximum (8 vs 1).
Changes:
- Add AD4088_CHIP_ID definition (0x0058)
- Create ad4088_channel with 14-bit resolution and 16-bit storage
- Add ad4088_chip_info with lvds_cnv_clk_cnt_max = 8
- Register AD4088 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 728df626f09e..fc261d3d7687 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -133,6 +133,7 @@
#define AD4085_CHIP_ID 0x0055
#define AD4086_CHIP_ID 0x0056
#define AD4087_CHIP_ID 0x0057
+#define AD4088_CHIP_ID 0x0058
#define AD4080_LVDS_CNV_CLK_CNT_MAX 7
@@ -456,6 +457,8 @@ static const struct iio_chan_spec ad4086_channel = AD4080_CHANNEL_DEFINE(14, 16)
static const struct iio_chan_spec ad4087_channel = AD4080_CHANNEL_DEFINE(14, 16);
+static const struct iio_chan_spec ad4088_channel = AD4080_CHANNEL_DEFINE(14, 16);
+
static const struct ad4080_chip_info ad4080_chip_info = {
.name = "ad4080",
.product_id = AD4080_CHIP_ID,
@@ -536,6 +539,16 @@ static const struct ad4080_chip_info ad4087_chip_info = {
.lvds_cnv_clk_cnt_max = 1,
};
+static const struct ad4080_chip_info ad4088_chip_info = {
+ .name = "ad4088",
+ .product_id = AD4088_CHIP_ID,
+ .scale_table = ad4080_scale_table,
+ .num_scales = ARRAY_SIZE(ad4080_scale_table),
+ .num_channels = 1,
+ .channels = &ad4088_channel,
+ .lvds_cnv_clk_cnt_max = 8,
+};
+
static int ad4080_setup(struct iio_dev *indio_dev)
{
struct ad4080_state *st = iio_priv(indio_dev);
@@ -698,6 +711,7 @@ static const struct spi_device_id ad4080_id[] = {
{ "ad4085", (kernel_ulong_t)&ad4085_chip_info },
{ "ad4086", (kernel_ulong_t)&ad4086_chip_info },
{ "ad4087", (kernel_ulong_t)&ad4087_chip_info },
+ { "ad4088", (kernel_ulong_t)&ad4088_chip_info },
{ }
};
MODULE_DEVICE_TABLE(spi, ad4080_id);
@@ -711,6 +725,7 @@ static const struct of_device_id ad4080_of_match[] = {
{ .compatible = "adi,ad4085", &ad4085_chip_info },
{ .compatible = "adi,ad4086", &ad4086_chip_info },
{ .compatible = "adi,ad4087", &ad4087_chip_info },
+ { .compatible = "adi,ad4088", &ad4088_chip_info },
{ }
};
MODULE_DEVICE_TABLE(of, ad4080_of_match);
--
2.43.0
On Fri, 2026-02-06 at 15:08 +0200, Antoniu Miclaus wrote:
> Add support for AD4088 14-bit SAR ADC. The AD4088 has the same
> resolution as AD4087 (14-bit) but differs in LVDS CNV clock count
> maximum (8 vs 1).
>
> Changes:
> - Add AD4088_CHIP_ID definition (0x0058)
> - Create ad4088_channel with 14-bit resolution and 16-bit storage
> - Add ad4088_chip_info with lvds_cnv_clk_cnt_max = 8
> - Register AD4088 in device ID and OF match tables
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
Same,
Reviewed-by: Nuno Sá <nuno.sa@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 728df626f09e..fc261d3d7687 100644
> --- a/drivers/iio/adc/ad4080.c
> +++ b/drivers/iio/adc/ad4080.c
> @@ -133,6 +133,7 @@
> #define AD4085_CHIP_ID 0x0055
> #define AD4086_CHIP_ID 0x0056
> #define AD4087_CHIP_ID 0x0057
> +#define AD4088_CHIP_ID 0x0058
>
> #define AD4080_LVDS_CNV_CLK_CNT_MAX 7
>
> @@ -456,6 +457,8 @@ static const struct iio_chan_spec ad4086_channel =
> AD4080_CHANNEL_DEFINE(14, 16)
>
> static const struct iio_chan_spec ad4087_channel = AD4080_CHANNEL_DEFINE(14, 16);
>
> +static const struct iio_chan_spec ad4088_channel = AD4080_CHANNEL_DEFINE(14, 16);
> +
> static const struct ad4080_chip_info ad4080_chip_info = {
> .name = "ad4080",
> .product_id = AD4080_CHIP_ID,
> @@ -536,6 +539,16 @@ static const struct ad4080_chip_info ad4087_chip_info = {
> .lvds_cnv_clk_cnt_max = 1,
> };
>
> +static const struct ad4080_chip_info ad4088_chip_info = {
> + .name = "ad4088",
> + .product_id = AD4088_CHIP_ID,
> + .scale_table = ad4080_scale_table,
> + .num_scales = ARRAY_SIZE(ad4080_scale_table),
> + .num_channels = 1,
> + .channels = &ad4088_channel,
> + .lvds_cnv_clk_cnt_max = 8,
> +};
> +
> static int ad4080_setup(struct iio_dev *indio_dev)
> {
> struct ad4080_state *st = iio_priv(indio_dev);
> @@ -698,6 +711,7 @@ static const struct spi_device_id ad4080_id[] = {
> { "ad4085", (kernel_ulong_t)&ad4085_chip_info },
> { "ad4086", (kernel_ulong_t)&ad4086_chip_info },
> { "ad4087", (kernel_ulong_t)&ad4087_chip_info },
> + { "ad4088", (kernel_ulong_t)&ad4088_chip_info },
> { }
> };
> MODULE_DEVICE_TABLE(spi, ad4080_id);
> @@ -711,6 +725,7 @@ static const struct of_device_id ad4080_of_match[] = {
> { .compatible = "adi,ad4085", &ad4085_chip_info },
> { .compatible = "adi,ad4086", &ad4086_chip_info },
> { .compatible = "adi,ad4087", &ad4087_chip_info },
> + { .compatible = "adi,ad4088", &ad4088_chip_info },
> { }
> };
> MODULE_DEVICE_TABLE(of, ad4080_of_match);
© 2016 - 2026 Red Hat, Inc.