From: John Rippetoe <jrippetoe@comconcepts.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Output problem with adcxx on at91
Date: Fri, 10 Aug 2012 13:12:55 +0000 [thread overview]
Message-ID: <502508D7.8040707@comconcepts.com> (raw)
In-Reply-To: <5019526C.2030802@comconcepts.com>
On 08/10/2012 08:31 AM, John Rippetoe wrote:
> Marc,
>
> No problem at all, better for it to be accessible to others in case they run across similar issues.
>
> No kidding? As far as I know the at91rm9200 is essentially the grandfather of the at91sam9g20 I am using now; similar design but two revisions older.
>
> As of yesterday afternoon I myself have begun to suspect there could be a problem with the spi controller hardware within the mcu. I have also been working with the board manufacturer in solving this problem as well. In an attempt to troubleshoot your driver I was comparing it with a different kernel driver recommended by my board manufacturer (Micromint) that was written by another customer. This particular driver has apparently been well received, however, I have yet to have any luck getting it to work. Even when a representative from the company sent it to me precompiled and tested, I still had no lluck getting it to work in an identical environment.
>
> Now I know the ADC works because I have userland code which directly accesses the ADC and I get correct output. Note that this code completely bypasses the atmel spi controller and operates directly on the ADC128S052s registers. Suspicious right?
Strike that, the userland example doesn't access the ADC directly. It
actually accesses the spi controller directly. I didn't have a copy of
the code on hand when I wrote that and was mistaken. Sorry about that.
>
> I assume you are using the atmel-spi driver as the master controller driver correct? If so, did you make any modifications to it at all?
>
> Thanks for your help guys.
>
> John
>
> Marc Pignat <marc.pignat@hevs.ch> wrote:
>
>> Hi John,
>>
>> (You asked me in private, but I prefer to respond on the mailing list).
>>
>> This driver was working, I wrote (and tested it) in 2008 ;)
>> The hardware it was running on was a custom at91rm9200 based board with
>> a adc084s051.
>> The last time a checked it, it was on 2.6.28, and it was still working fine.
>>
>> I just had a look to the adc128s052 datasheet, and it looks compatible
>> with this driver.
>>
>> Guenter, the spi_write_then_read() function is really the good one.
>> In brief, the write selects the channel, then the read reads the data.
>>
>> I think the problem you're facing is either in the spi driver or in the
>> hardware.
>>
>>
>> Best regards
>>
>>
>> Marc
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
--
Respectfully,
John Rippetoe
Communication Concepts
813-888-6611
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2012-08-10 13:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 15:59 [lm-sensors] Output problem with adcxx on at91 John Rippetoe
2012-08-01 16:52 ` Guenter Roeck
2012-08-01 20:12 ` John Rippetoe
2012-08-01 21:56 ` Guenter Roeck
2012-08-02 3:07 ` John
2012-08-10 6:46 ` Marc Pignat
2012-08-10 12:31 ` John Rippetoe
2012-08-10 13:12 ` John Rippetoe [this message]
2012-08-10 16:34 ` Guenter Roeck
2012-08-13 6:09 ` Marc Pignat
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=502508D7.8040707@comconcepts.com \
--to=jrippetoe@comconcepts.com \
--cc=lm-sensors@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.