Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6592027imu; Wed, 14 Nov 2018 04:07:19 -0800 (PST) X-Google-Smtp-Source: AJdET5fArMZbPbflu6Qp/CqtoVSFm1pDGJAOy8BciSLkOQDbPmetqZlvQ+WxHWIjCC9QBayTpX+/ X-Received: by 2002:a62:7989:: with SMTP id u131-v6mr974038pfc.168.1542197239393; Wed, 14 Nov 2018 04:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542197239; cv=none; d=google.com; s=arc-20160816; b=lh02sDZhwNYKYDMHReSGCFEnWLrzBhVZARRHrhbcsHel9W52JfrJ6rTCrVddqQamie 0VzkwFXcn9zcX3BqKoonfg8EoLmEXBJAzWeUH1G80OpxMykfMr7VyspaP/JjsL1Rq/jn IxDTQfWYYV5eqo9NW0DopwL6rZ7WSWqzICYM6mrc1rDe0qMuwpdzF9z5niZ0VFCv7Nv1 7HAp9dkUO7fksPUk/oMtryuChZisHuIHHpYYx/EuLuIMdCumbysh6r1h2c/XrbjjvRys 25TtcHAWUsGp94DJxQht+Lug6ewF6HqYEjiM8NcQiRjziw19U2ImutZjhfrISsugV5Ct 9BlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=aVNmJ2hbCsCAEXziKdG38YtU1UawDvl2OyT//j7JeSs=; b=DMG47XMFJiJ+orQnAKRKUl9YfusJSMRRgK/8K/n2ywypBOt6D0AKRKfSXpF9hVZej1 s8P9zUEgsAmciIMBEz5Gy5WzGWYyc4YapIzlpf5KYMM/UN22x/+Z+LPtbldUIsfKRX+y XUAWqsLeeeoI/yA4oIoEvGNjLvhkG6MUcYTeQTaz2ATDSHkAVCd4lsHjqKbb9SsDtFcq XnNxc8dz1rJCgDAgu8X3NSZnlJwIKvHwSx656D90ye1Nf1blTMCtW6YpieocHTIbm4m6 E3SwvdZTmoRF1xa0L59i/z5FYcBNlPE0lT6lHw5SHf+EWmROqI1rpK9tYRGfFbeJPE/i ty/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q71-v6si27463164pfq.166.2018.11.14.04.06.54; Wed, 14 Nov 2018 04:07:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732725AbeKNWJE (ORCPT + 99 others); Wed, 14 Nov 2018 17:09:04 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:49022 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727969AbeKNWJE (ORCPT ); Wed, 14 Nov 2018 17:09:04 -0500 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23992362AbeKNMFPSER-C (ORCPT + 1 other); Wed, 14 Nov 2018 13:05:15 +0100 Date: Wed, 14 Nov 2018 12:05:14 +0000 (GMT) From: "Maciej W. Rozycki" To: Alexandre Belloni cc: Alessandro Zummo , Matt Turner , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: m41t80: Complete error propagation from SMBus calls In-Reply-To: <20181114095737.GV29768@piout.net> Message-ID: References: <20181114095737.GV29768@piout.net> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Nov 2018, Alexandre Belloni wrote: > > I'll be posting further patches over the coming weeks, based on my > > original effort as archived here: , > > > > However I have just realised they'll need another iteration before I post > > them. So for now just these two obvious fixes. > > > > Regarding the persistent part, do you really need more than what is > provided? As far as I know, the timekeeping core is already taking care > of using the best source to get the suspended time. For that we have platform code duplicating what the RTC framework already does. Some of that cannot be made to work reasonably. See e.g. arch/mips/dec/time.c or arch/mips/sibyte/swarm/rtc_*.c. The DEC code is technically sound, but spreads the same function (RTC r/w access) across another place, in addition to drivers/rtc/rtc-cmos.c. The SiByte code bypasses the I2C driver and therefore cannot be converted to use I2C interrupts, which means system latency problems. The write part used for NTP can be removed right away by making it return -ENODEV, and I have separate patches to do that for these platforms. The read part cannot AFAICT. I think we can discuss that when I post the patches. The m41t80 driver currently does not work for me anyway and has to be fixed because of: i2c /dev entries driver i2c-sibyte: i2c SMBus adapter module for SiByte board i2c i2c-1: doesn't support I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_I2C_BLOCK and the persistent part is only one patch in the upcoming number of changes. Thanks for taking the other three patches. Maciej