Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp293708yba; Wed, 3 Apr 2019 08:51:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLNT/EJZGACSsZrFM0PuzyuoUccwuoRlKAZH0ch8fj84T6wqOafuqdWzlC5AM6rKq/VKhf X-Received: by 2002:a17:902:f01:: with SMTP id 1mr659640ply.41.1554306693006; Wed, 03 Apr 2019 08:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554306692; cv=none; d=google.com; s=arc-20160816; b=SsyeOtarlX0N/wCEsmCBuS3C4MlTQmem3Mrr12GIHtZsH3XmKQGUTd27SICxVX9Mom 4x+syzhhsx/+9aa6Pt/SgdBo8QunDm+/oCOIuPn2AVaH3cSgMEZCraESIVriV8Kcp9T0 1mDwIyTE6k2tlwZDRebNOFQc/oHSeoXbA/463YwFqYYHuQnK7s2CmX7s6qJi0DgKYBxP 6Pb6t3cb7pCfn+Aj60CPqcPJANt5yql4EnZVJSak8KDGCHQz9w2v/UeArc/U4Jw1kjCo T4xHZlPtyVPtfXROfrhdL6ATQjmGkMlXF4PJMI96w5eh6dF0T8+wvwKEtB9pAtk2peBq n32A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=E4NlUHrADlIAHH0SZlkfW34Utnh8Egxz5cQsvLdHJ4Q=; b=SzCMIJTer8n15/G68yAGfpwKOVhOeVceUUtigZNM47CzmscdRfpoDjSCIxX2OavSi0 MlKwxhPjktt2HI2NJWkGCMUSCjis+ka6/kE6V4EJVVb5v3jhgy2QjpblptiHHEpGheYJ IHvcz79QYSlAssg3iT7B0c97LcfdeTMFe0HMr69Mz7uojqbkA30egdeJOuwXEH31wp2u YniCgsjXXrjLGXYgdtzjrg3eHb9SCVHi1XXqQTjivPzFUpaVMwJXHn9AeIKps4a3YWTI zv/yMfRFvE9VyRpzkhCXGs693Q6PjEMROtP4o6I8Xideu4qqL7O1QIzJwz/k+ZOQex5r OK/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 x4si13730982plr.406.2019.04.03.08.51.17; Wed, 03 Apr 2019 08:51:32 -0700 (PDT) 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 S1727011AbfDCPtL convert rfc822-to-8bit (ORCPT + 99 others); Wed, 3 Apr 2019 11:49:11 -0400 Received: from smtp.asem.it ([151.1.184.197]:62577 "EHLO smtp.asem.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbfDCPtK (ORCPT ); Wed, 3 Apr 2019 11:49:10 -0400 Received: from webmail.asem.it by asem.it (smtp.asem.it) (SecurityGateway 5.5.0) with ESMTP id SG003789739.MSG for ; Wed, 03 Apr 2019 17:49:03 +0200S Received: from ASAS044.asem.intra (172.16.16.44) by ASAS044.asem.intra (172.16.16.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 3 Apr 2019 17:49:03 +0200 Received: from ASAS044.asem.intra ([::1]) by ASAS044.asem.intra ([::1]) with mapi id 15.01.1261.035; Wed, 3 Apr 2019 17:49:03 +0200 From: Flavio Suligoi To: Alexandre Belloni CC: Alessandro Zummo , Rob Herring , Mark Rutland , "linux-rtc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 2/2] rtc: pcf2127: add battery-low INTn generation Thread-Topic: [PATCH 2/2] rtc: pcf2127: add battery-low INTn generation Thread-Index: AQHU6izzDrhx33Rd2E28nY3Qp112E6YqaEkAgAAhzmD//+S2gIAAI/HA Date: Wed, 3 Apr 2019 15:49:03 +0000 Message-ID: References: <1554303165-24813-1-git-send-email-f.suligoi@asem.it> <1554303165-24813-2-git-send-email-f.suligoi@asem.it> <20190403150824.GO22216@piout.net> <452a4cf1410a41c8b6f767ac6258482e@asem.it> <20190403153143.GQ22216@piout.net> In-Reply-To: <20190403153143.GQ22216@piout.net> Accept-Language: it-IT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.17.208] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SGHeloLookup-Result: pass smtp.helo=webmail.asem.it (ip=172.16.16.44) X-SGSPF-Result: none (smtp.asem.it) X-SGOP-RefID: str=0001.0A0B0210.5CA4D5F0.003A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 (_st=1 _vt=0 _iwf=0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > On 03/04/2019 16:52:45+0200, Flavio Suligoi wrote: > > > > The pcf2127 has an automatic battery-low detection function. > > > > > > > > In case of battery-low event, an interrupt generation through > > > > the pin INTn (active low) can be enabled, setting the flag BLIE > > > > in the register Control_3. > > > > > > > > This function is activated by the "battery-low-hw-alarm" DT > property. > > > > > > > > Example of use for an NXP i.MX7D board: > > > > > > > > &i2c3 { > > > > clock-frequency = <100000>; > > > > pinctrl-names = "default"; > > > > pinctrl-0 = <&pinctrl_i2c3>; > > > > status = "okay"; > > > > > > > > pcf2127@51 { > > > > compatible = "nxp,pcf2127"; > > > > reg = <0x51>; > > > > battery-low-hw-alarm; > > > > status = "okay"; > > > > }; > > > > }; > > > > > > > > > > So I'm curious, how do you then use that signal? I have a (not yet > sent) > > > series adding alarm support for the pcf2127. The issue having BLIE is > > > that then this will prevent the alarm to work properly. > > > > > > So my guess is that you have nINT connected to an LED or something > that > > > the user can see? > > > > > > > I'm working on our custom embedded board with an NXP i.MX7D, > > developed here, in Asem (www.asem.it). > > The nINT pin is connected to a GPIO of the MX7 and then > > used by an applicative sw, to generate an alarm for the user. > > > > Then, you should probably not enable BLIE because this will cause issues > with the alarm functionnality.. It is certainly enough to use > RTC_VL_READ periodically. We use the nINT signaling solution because of this pin, in addition to be used by the CPU, can be also connected to an external connector, available for the final user. Anyway, even if the BLIE is set, the sw low voltage alarm works, with the message (displayed about every 12 minutes): rtc-pcf2127-i2c 2-0051: low voltage detected, check/replace RTC battery. What kind of issues did you find with BLIE enabled? Flavio