* Re: iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" [not found] <547439F9.7070903@topic.nl> @ 2014-11-25 14:03 ` Lars-Peter Clausen 2014-11-26 9:47 ` Mike Looijmans 0 siblings, 1 reply; 3+ messages in thread From: Lars-Peter Clausen @ 2014-11-25 14:03 UTC (permalink / raw) To: Mike Looijmans, pmeerw; +Cc: linux-iio@vger.kernel.org [-- 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); ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" 2014-11-25 14:03 ` iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" Lars-Peter Clausen @ 2014-11-26 9:47 ` Mike Looijmans 2014-11-26 10:07 ` Lars-Peter Clausen 0 siblings, 1 reply; 3+ messages in thread From: Mike Looijmans @ 2014-11-26 9:47 UTC (permalink / raw) To: Lars-Peter Clausen, pmeerw; +Cc: linux-iio@vger.kernel.org On 11/25/2014 03:03 PM, Lars-Peter Clausen wrote: > 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 > The attached patch delivered the following output (using the current head code): ad799x 1-0029: config: b 0 Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Systems Eindhovenseweg 32-C, NL-5683 KH Best Postbus 440, NL-5680 AK Best Telefoon: (+31) (0) 499 33 69 79 Telefax: (+31) (0) 499 33 69 70 E-mail: mike.looijmans@topic.nl Website: www.topic.nl Please consider the environment before printing this e-mail Topic zoekt gedreven (embedded) software specialisten! http://topic.nl/vacatures/topic-zoekt-software-engineers/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" 2014-11-26 9:47 ` Mike Looijmans @ 2014-11-26 10:07 ` Lars-Peter Clausen 0 siblings, 0 replies; 3+ messages in thread From: Lars-Peter Clausen @ 2014-11-26 10:07 UTC (permalink / raw) To: Mike Looijmans, pmeerw; +Cc: linux-iio@vger.kernel.org On 11/26/2014 10:47 AM, Mike Looijmans wrote: > On 11/25/2014 03:03 PM, Lars-Peter Clausen wrote: >> 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 >> > > The attached patch delivered the following output (using the current head > code): > > ad799x 1-0029: config: b 0 > Yea, kind of what I expected based on your description. Looking at the datasheet it seems the ad7999 doesn't even support register read back which would explain the issue. I'll try to find a board and see if I can fix it. - Lars ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-26 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <547439F9.7070903@topic.nl>
2014-11-25 14:03 ` iio:adc:ad799x driver broken after commit "Write default config on probe and reset alert status on probe" Lars-Peter Clausen
2014-11-26 9:47 ` Mike Looijmans
2014-11-26 10:07 ` Lars-Peter Clausen
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).