mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Marcelo Schmitt <marcelo.schmitt@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux@analog.com, jic23@kernel.org,
	Michael.Hennerich@analog.com, nuno.sa@analog.com,
	eblanc@baylibre.com, dlechner@baylibre.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	olivier.moysan@foss.st.com, marcelo.schmitt1@gmail.com
Subject: Re: [PATCH v2 3/5] iio: adc: adi-axi-adc: Support AXI ADA4355 IP core
Date: Mon, 30 Nov 2026 16:15:33 +0200	[thread overview]
Message-ID: <aw2FBYN1I0XxsGaN@ashevche-desk.local> (raw)
In-Reply-To: <e92787fd505e967d32352db854b40e1f1985b51c.1795816065.git.marcelo.schmitt@analog.com>

On Fri, Nov 27, 2026 at 06:52:38PM -0300, Marcelo Schmitt wrote:
> The AXI ADA4355 IP core provides the HDL interface to ADA4355 devices. It
> differs from the generic AXI ADC core in its register layout and requires
> a data frame setup step in which the number of active serial lanes is
> programmed.
> 
> Add a separate backend operation for the AXI ADA4355 IP core and register
> it as a new compatible of the adi-axi-adc driver.

> Link: https://analogdevicesinc.github.io/hdl/library/axi_ada4355/index.html

Don't put unreferred Link tags. Better to add a reference to the tag
(in a form of Link: $URL [1]) and use [1] in the commit message.

...

> +static int axi_adc_ada4355_calibration_source_set(struct iio_backend *back,
> +						  enum iio_backend_calib_source source,
> +						  unsigned int lane)
> +{
> +	struct adi_axi_adc_state *st = iio_backend_get_priv(back);
> +	u32 val;
> +
> +	switch (source) {
> +	case IIO_BACKEND_CALIB_SOURCE_NONE:
> +		val = 0;
> +		break;
> +	case IIO_BACKEND_CALIB_SOURCE_FRAME:
> +		val = ADI_AXI_ADC_LVDS_FRAME_ERROR;
> +		break;
> +	case IIO_BACKEND_CALIB_SOURCE_DATA_LANE:
> +		if (BIT(lane) & ~ADI_AXI_ADC_LVDS_LANE_ERROR)
> +			return -EINVAL;
> +		val = BIT(lane);

Why not the opposite order?

		val = BIT(lane);
		if (val & ~ADI_AXI_ADC_LVDS_LANE_ERROR)
			return -EINVAL;

since 'val' is local, it doesn't make any functional difference.

> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	return regmap_update_bits(st->regmap, ADI_AXI_ADC_REG_LVDS,
> +				  ADI_AXI_ADC_LVDS_FRAME_ERROR |
> +				  ADI_AXI_ADC_LVDS_LANE_ERROR, val);
> +}

...

>  	{ .compatible = "adi,axi-adc-10.0.a", .data = &adc_generic },
>  	{ .compatible = "adi,axi-ad408x", .data = &adi_axi_ad408x },
>  	{ .compatible = "adi,axi-ad485x", .data = &adi_axi_ad485x },
>  	{ .compatible = "adi,axi-ad7606x", .data = &adc_ad7606 },
> +	{ .compatible = "adi,axi-ada4355", .data = &adi_axi_ada4355 },

I'm a bit puzzled with the ordering here, but despite the generic record,
the rest seems okay.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-11-30 14:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 21:51 [PATCH v2 0/5] Add support for ADA4355 Marcelo Schmitt
2026-11-27 21:51 ` [PATCH v2 1/5] iio: backend: Add calibration source interface Marcelo Schmitt
2026-11-27 21:52 ` [PATCH v2 2/5] dt-bindings: iio: adc: Add AXI ADA4355 IP CORE Marcelo Schmitt
2026-11-27 21:52 ` [PATCH v2 3/5] iio: adc: adi-axi-adc: Support AXI ADA4355 IP core Marcelo Schmitt
2026-11-30 14:15   ` Andy Shevchenko [this message]
2026-11-27 21:52 ` [PATCH v2 4/5] dt-bindings: iio: adc: Add ADA4355 Marcelo Schmitt
2026-11-27 23:38   ` Jonathan Cameron
2026-11-27 21:53 ` [PATCH v2 5/5] iio: adc: Add support for ADA4355 and similar ADCs Marcelo Schmitt
2026-11-28  0:19   ` Jonathan Cameron
2026-11-27 23:33 ` [PATCH v2 0/5] Add support for ADA4355 Jonathan Cameron
2026-11-30 20:15   ` Marcelo Schmitt

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=aw2FBYN1I0XxsGaN@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=eblanc@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcelo.schmitt@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.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

all inboxes | Powered by JetHome®