Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp467154pxp; Fri, 11 Mar 2022 07:51:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjjjbUVMiPOhRYvNGlAuzWU5XxiqUpZEbfZM8FXHfmFFsL2SA2BNswzR2nwPoCLgkKVxs7 X-Received: by 2002:a17:90a:17e6:b0:1be:d65e:82b4 with SMTP id q93-20020a17090a17e600b001bed65e82b4mr11300096pja.166.1647013915028; Fri, 11 Mar 2022 07:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647013915; cv=none; d=google.com; s=arc-20160816; b=Ok3I9G7jkp5bCTLL8xhBD5YCMJqR/R2M5iIiDdrhxyQqz4V3ApnrCNkDwCO3PG9ZuM lm01eN0O8LponJsXjCHFJ9y2MpnNbDphWtZhY8SMQTRPyThzm22vGoN5btfusLAYDQtt 9E0AZ09516npPMQHHsRbJVrKcz6ln5AIZAvYsw6b7FEJIu/MelVEDimy0W8lGLmpMDmw ng02lj8lf1LoPysW6n73var4fQY+kOfYYcOpXzWQVC6ddudCAk8qRhIuenSvzSjZry19 6b6Gj3MjClpHJZZ1dp4y7d5aOrtD1LEMnqcU/wVII9XptWz7J91PVyTNl/Z0h/YHxJlV 5YNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jAMRau9vsG1Ep623pXQhR3FKPYrUOoJF+fXhTyrVKaw=; b=aAzcpXfbfrFRZfEOSRC5NH740WCZQzx3oSU55p9FjhucGkyuLGrj6Qac3nb/DHyYv2 7yXJ1sRgbUJHynEtWS+cZgo3Cy6u7ngCGsEbKli3lbncDhPNpsikhLM8a/q75B7Q2JRX 2qa+Vgcj/+rWJQxIc4uDVIEBO7jPDVqGsmf+JxT/4MunC4BPrfFZdUOyxfOXaJ16GQfX 3B8veQ8z8EbqWCXwX+Jvb9i1LQAkmO4y75TY30h9sBYGiAy4arPFANOzJZSGUois27y2 pifZ5LcDkeEMzLfumCS/v0dV/SDf9jJI7PvPc9GPnjI9i3pgYCFSioXe4B/gCO5OoWSK /4xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hBOMXCVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h33-20020a632121000000b00370de8333desi8406128pgh.702.2022.03.11.07.51.42; Fri, 11 Mar 2022 07:51:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hBOMXCVu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242797AbiCJU74 (ORCPT + 99 others); Thu, 10 Mar 2022 15:59:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbiCJU7z (ORCPT ); Thu, 10 Mar 2022 15:59:55 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39638DB4A3; Thu, 10 Mar 2022 12:58:52 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4E53060007; Thu, 10 Mar 2022 20:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1646945930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jAMRau9vsG1Ep623pXQhR3FKPYrUOoJF+fXhTyrVKaw=; b=hBOMXCVusCAhQc/W8ZmZxbI13RfoqG5i5wzmpy2vPNHnPvYqWW0hOGliWG4Mq/KbarXrkE FfbZRzdk0yqsehqw7e7yGPNxq3HRmb7CvS0eXcS66JAkGMEGEqhUkzfe9R3RwkRcLV1X4+ xFSR6w0e6qz+VlxTedYjuzPGsVlTSk2GtRA5FzkePkmd+NXOCFpfgETruEFIb6wkhkPI0P oSLK0deuKpdjBosREhQibMx+CBM90jriAEe/0LRq0ZdVnJlQz0dTeY3soxlX+EQqlgjqxh V/odqNxlUbtu6rkxQHNdDvi+YFrksWfOuKqD95LBsl8+GKVstUgtgDJLwfYCmw== Date: Thu, 10 Mar 2022 21:58:49 +0100 From: Alexandre Belloni To: Hugo Villeneuve Cc: Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/29] rtc: pcf2127: set RTC_FEATURE_ALARM_RES_2S Message-ID: References: <20220309162301.61679-1-alexandre.belloni@bootlin.com> <20220309162301.61679-11-alexandre.belloni@bootlin.com> <20220310110918.41a681474f5a0e11abdedc39@hugovil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220310110918.41a681474f5a0e11abdedc39@hugovil.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/2022 11:09:18-0500, Hugo Villeneuve wrote: > On Wed, 9 Mar 2022 17:22:42 +0100 > Alexandre Belloni wrote: > > > The PCF2127 doesn't support UIE because setting an alarm to fire every > > second confuses the chip and the fastest we can go is an alarm every 2 > > seconds. > > Hi Alexandre, > can you describe what "confuses the chip" means? > > In my experimental PCF2131 driver, I activated UIE and it seems to be working fine at 1s intervals, but since it is similar to PCF2127, maybe there is still a problem and I just didn't see it. > Did you remove uie_unsupported? Else, you may have been using uie emulation. In my tests last year, the pcf2127 was failing to reassert the interrupt if an alarm was set every second. The same happens on other NXP based RTCs (i.e. including microcrystal ones). I'm going to test again soon (and also reply to your series). > Hugo. > > > > Signed-off-by: Alexandre Belloni > > --- > > drivers/rtc/rtc-pcf2127.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c > > index f8469b134411..63b275b014bd 100644 > > --- a/drivers/rtc/rtc-pcf2127.c > > +++ b/drivers/rtc/rtc-pcf2127.c > > @@ -656,6 +656,7 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap, > > pcf2127->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; > > pcf2127->rtc->range_max = RTC_TIMESTAMP_END_2099; > > pcf2127->rtc->set_start_time = true; /* Sets actual start to 1970 */ > > + set_bit(RTC_FEATURE_ALARM_RES_2S, pcf2127->rtc->features); > > clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, pcf2127->rtc->features); > > clear_bit(RTC_FEATURE_ALARM, pcf2127->rtc->features); > > > > -- > > 2.35.1 > > > > > -- > Hugo Villeneuve -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com