Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447831

Re: [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround

From Benoît Thébaudeau <benoit@wsystem.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround
Date 2016-07-21 14:40 +0200
Message-ID <rXlqG-7qs-19@gated-at.bofh.it> (permalink)
References <rXjIe-6iZ-7@gated-at.bofh.it> <rXjIf-6iZ-61@gated-at.bofh.it> <rXkbg-6I6-13@gated-at.bofh.it>
Organization Waves System

Show all headers | View raw


On 21/07/2016 at 13:10, Alexandre Belloni wrote:
> On 21/07/2016 at 12:41:30 +0200, Benoît Thébaudeau wrote :
>> The I²C NACK issue of the RV-8803 may occur after any I²C START
>> condition, depending on the timings. Consequently, the workaround must
>> be applied for all the I²C transfers.
>>
>> This commit abstracts the I²C transfer code into register access
>> functions. This avoids duplicating the I²C workaround everywhere. This
>> also avoids the duplication of the code handling the return value of
>> i2c_smbus_read_i2c_block_data(). Error messages are issued in case of
>> definitive register access failures (if the workaround fails). This
>> change also makes the I²C transfer return value checks consistent.
>>
> 
> Well, my initial idea was that the workaround is actually needed only
> for operations that are not restartable from userspace.
> 
> Did you it that bug? On which RTC?

No, I've not seen that bug. However, the errata sheet says that this issue may
occur if two consecutive I²C START conditions are slightly more than 950 ms
apart. It does not even say that this is restricted to I²C transfers addressing
this RTC. Moreover, if the time is read or set from userspace, this might occur
at any time relatively to an RTC interrupt or to a previous time read/set
operation, so possibly 950 ms afterwards.

All in all, it's safer and easier to always apply this workaround, all the more
it is applied at almost no cost when there is no issue.

Best regards,
Benoît

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/6] rtc: rv8803: Kconfig: Indicate rx8900 support Benoît Thébaudeau <benoit@wsystem.com> - 2016-07-21 12:50 +0200
  [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround Benoît Thébaudeau <benoit@wsystem.com> - 2016-07-21 12:50 +0200
    Re: [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-07-21 13:20 +0200
      Re: [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround Benoît Thébaudeau <benoit@wsystem.com> - 2016-07-21 14:40 +0200
      Re: [PATCH 4/6] rtc: rv8803: Always apply the I²C workaround Benoît Thébaudeau <benoit@wsystem.com> - 2016-07-21 20:50 +0200

csiph-web