linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mike Looijmans <mike.looijmans@topic.nl>, pmeerw@pmeerw.net
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe"
Date: Tue, 25 Nov 2014 15:03:52 +0100	[thread overview]
Message-ID: <54748C48.1090608@metafoo.de> (raw)
In-Reply-To: <547439F9.7070903@topic.nl>

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On 11/25/2014 09:12 AM, Mike Looijmans wrote:
> After this commit:
>
>      iio:adc:ad799x: Write default config on probe and reset alert status on
> probe
>
>      writing ALERT_EN and BUSY_ALERT to the chip config register clears
>      pending alerts, BUSY_ALERT is cleared when reading back the register
>
> The AD7999 on our board no longer functions, reading the in_voltage*_raw
> sysfiles always returns "255" after this.
>
> I reverted the commit, and that fixed the problem for me.

I suspect that there is something going wrong when reading back the config 
register, can you check the attached patch and see what the output is?

Thanks,
- Lars


[-- Attachment #2: ad799x.patch --]
[-- Type: text/x-patch, Size: 472 bytes --]

diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
index e37412d..babbdde 100644
--- a/drivers/iio/adc/ad799x.c
+++ b/drivers/iio/adc/ad799x.c
@@ -816,6 +816,8 @@ static int ad799x_probe(struct i2c_client *client,
 	if (ret < 0)
 		goto error_disable_reg;
 	st->config = ret;
+	dev_info(&client->dev, "config: %x %x\n", st->config,
+		st->chip_config->default_config);
 
 	ret = iio_triggered_buffer_setup(indio_dev, NULL,
 		&ad799x_trigger_handler, NULL);

       reply	other threads:[~2014-11-25 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <547439F9.7070903@topic.nl>
2014-11-25 14:03 ` Lars-Peter Clausen [this message]
2014-11-26  9:47   ` iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" Mike Looijmans
2014-11-26 10:07     ` Lars-Peter Clausen

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=54748C48.1090608@metafoo.de \
    --to=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=pmeerw@pmeerw.net \
    /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).