linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <michael.hennerich@analog.com>
Subject: Re: [PATCH] staging: iio: adc: ad7192: disable burnout currents on misconfig
Date: Sun, 14 Jan 2018 12:33:46 +0000	[thread overview]
Message-ID: <20180114123346.3c8ffd53@archlinux> (raw)
In-Reply-To: <20180110111411.18505-1-alexandru.ardelean@analog.com>

On Wed, 10 Jan 2018 13:14:11 +0200
<alexandru.ardelean@analog.com> wrote:

> From: Alexandru Ardelean <alexandru.ardelean@analog.com>
> 
> According to the datasheet for all ad719x ADCs,
> the burnout currents can be enabled only if buffer is enabled
> and CHOP is disabled.
> 
> So, if neither of these conditions are met, then
> we should disable the burnout currents in the driver as well,
> and warn the user.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

What this patch is missing is a description of what the result of
getting this wrong is.  Does this break the device, cause fires
or just not work as expected?

We need this information to decided whether backporting to stable
is required or not.

Patch content is fine.

Jonathan

> ---
>  drivers/staging/iio/adc/ad7192.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
> index d11c6de9c777..7f204013d6d4 100644
> --- a/drivers/staging/iio/adc/ad7192.c
> +++ b/drivers/staging/iio/adc/ad7192.c
> @@ -266,6 +266,12 @@ static int ad7192_setup(struct ad7192_state *st,
>  
>  	st->conf = AD7192_CONF_GAIN(0);
>  
> +	if (pdata->burnout_curr_en && (!pdata->buf_en || pdata->chop_en)) {
> +		pdata->burnout_curr_en = false;
> +		dev_warn(dev,
> +			 "Can't enable burnout currents: see CHOP or buffer\n");
> +	}
> +
>  	if (pdata->rej60_en)
>  		st->mode |= AD7192_MODE_REJ60;
>  


  reply	other threads:[~2018-01-14 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 11:14 [PATCH] staging: iio: adc: ad7192: disable burnout currents on misconfig alexandru.ardelean
2018-01-14 12:33 ` Jonathan Cameron [this message]
2018-01-18 14:38 ` [PATCH v3] " alexandru.ardelean
2018-01-18 14:57 ` [PATCH v4] " alexandru.ardelean
2018-01-20 15:26   ` 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=20180114123346.3c8ffd53@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=alexandru.ardelean@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@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;
as well as URLs for NNTP newsgroup(s).