public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Haibo Chen <haibo.chen@nxp.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>, "Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	linux-iio@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: imx93_adc: load calibrated values even calibration failed
Date: Wed, 23 Apr 2025 19:43:40 +0300	[thread overview]
Message-ID: <aAkYvE6VtoQItM5o@smile.fi.intel.com> (raw)
In-Reply-To: <20250423-adcpatch-v1-1-b0e84c27ae98@nxp.com>

On Wed, Apr 23, 2025 at 04:02:48PM +0800, Haibo Chen wrote:
> ADC calibration might fail because of the noise on reference voltage.
> To avoid calibration fail, need to meet the following requirement:
> ADC reference voltage Noise < 1.8V * 1/2^ENOB
> 
> For the case which the ADC reference voltage on board do not meet
> the requirement, still load the calibrated values, so ADC can also
> work but maybe not that accurate.

...

>  #define IMX93_ADC_PCDR6		0x118
>  #define IMX93_ADC_PCDR7		0x11c
>  #define IMX93_ADC_CALSTAT	0x39C
> +#define IMX93_ADC_CALCFG0	0X3A0

Please, keep one style of the hex values.
If the small letters are less used, prepare a patch to convert them, otherwise
do that for capital letters.

...

> +	if (msr & IMX93_ADC_MSR_CALFAIL_MASK)

Please keep {} as the body is quite long and it's easy to make a mistake in a
long term.

> +		/*
> +		 * Only give warning here, this means the noise of the
> +		 * reference voltage do not meet the requirement:
> +		 *     ADC reference voltage Noise < 1.8V * 1/2^ENOB
> +		 * And the reault of ADC is not that accurate.
> +		 */
>  		dev_warn(adc->dev, "ADC calibration failed!\n");
> -		imx93_adc_power_down(adc);
> -		return -EAGAIN;
> -	}

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2025-04-23 17:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  8:02 [PATCH] iio: adc: imx93_adc: load calibrated values even calibration failed Haibo Chen
2025-04-23 16:43 ` Andy Shevchenko [this message]
2025-06-17  3:07 ` Bough Chen
2025-06-21 15:58   ` 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=aAkYvE6VtoQItM5o@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=festevam@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=jic23@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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