lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Errant readings on LM81 with T2080 SoC
From
Date
On 3/11/21 1:17 PM, Chris Packham wrote:
>
> On 11/03/21 9:18 pm, Wolfram Sang wrote:
>>> Bummer. What is really weird is that you see clock stretching under
>>> CPU load. Normally clock stretching is triggered by the device, not
>>> by the host.
>> One example: Some hosts need an interrupt per byte to know if they
>> should send ACK or NACK. If that interrupt is delayed, they stretch the
>> clock.
>>
> It feels like something like that is happening. Looking at the T2080
> Reference manual there is an interesting timing diagram (Figure 14-2 if
> someone feels like looking it up). It shows SCL low between the ACK for
> the address and the data byte. I think if we're delayed in sending the
> next byte we could violate Ttimeout or Tlow:mext from the SMBUS spec.
>

I think that really leaves you only two options that I can see:
Rework the driver to handle critical actions (such as setting TXAK,
and everything else that might result in clock stretching) in the
interrupt handler, or rework the driver to handle everything in
a high priority kernel thread.

Guenter

\
 
 \ /
  Last update: 2021-03-11 22:36    [W:0.158 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site