From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504AbcGULKh (ORCPT ); Thu, 21 Jul 2016 07:10:37 -0400 Received: from down.free-electrons.com ([37.187.137.238]:46795 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752327AbcGULKc (ORCPT ); Thu, 21 Jul 2016 07:10:32 -0400 Date: Thu, 21 Jul 2016 13:10:08 +0200 From: Alexandre Belloni To: =?iso-8859-1?Q?Beno=EEt_Th=E9baudeau?= Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, Alessandro Zummo Subject: Re: [PATCH 4/6] rtc: =?iso-8859-1?Q?rv8803?= =?iso-8859-1?Q?=3A_Always_apply_the_I=B2C?= workaround Message-ID: <20160721111008.GE4446@piout.net> References: <1469097692-103146-1-git-send-email-benoit@wsystem.com> <1469097692-103146-4-git-send-email-benoit@wsystem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1469097692-103146-4-git-send-email-benoit@wsystem.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com