Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3416159yba; Mon, 8 Apr 2019 19:00:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY9CswDzUQOuhqttCIjhs0Q0TOe9NOm2mCtNCbT96CD6OsOFPvsbWRWBlECkjCg03dZxZQ X-Received: by 2002:a17:902:f81:: with SMTP id 1mr34418805plz.216.1554775217660; Mon, 08 Apr 2019 19:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554775217; cv=none; d=google.com; s=arc-20160816; b=YQdYOWXWcxQWHfZSwshUmYkLwNzVLyBGlBUX0mCJQVA1QsNgXUo5WWW4QXSNDvjJ27 OLCu+kWOvlmrFkV/bBjUY1ae4lSLLVZrtB7DWJW3wWn1PB5Y382x4SQr3b7RzpZ0Ncw4 0rYztNEcr6Y36UA4ycPvViXipXh7oTwjGxowci5tTLG0C/2Oo93Ktv3ya74Y6QIBucjb W0wghs9vvCGna7iY0332tu+6WRzQHbC8/fy74/A/RyDijxmC53qUbtc26P1Brb2A5453 sVeZeas/xBwNRzij49M9inrn8hWBkIZ6OCWfF4f/mi1RPlxYg5queAzpu4IsE9cejKgq ySMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wqdeEbRJ+im9e86EnwbXMvGW55UzahVtclDnI49Y0/A=; b=zMYkM8KPlNJcvYN8odXlUlELVKQo6zVrMsp8NrVxrWW9XTWvtKGulwRIuW8MIsZ4IP /w8GIbDScbNkiossBUMs7CK4qXRHpnJO98R9Moe95ut2UaGEzVzMWlk1ViATRQaSKVM+ BZJs7X6lPyDjMvrbZSB7eaudEGcGnZClif4fod/QGCI34gjiFYKl8S5lN6KdUVTrXAt1 HzT1EN2S+qPeaMg91Bw5tKVPXuMhVGKr0puq+W5SblulDZ6jkrIUpEZLETgdGa6akuqb yxaChMM0veoWiRxNMwPl10qWcJXvOEQA6n/VJ5HfPguF1ErxB9tq0t7np0/4nISIzcc0 V5GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZeYQtVe7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si19404727pgv.28.2019.04.08.18.59.49; Mon, 08 Apr 2019 19:00:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ZeYQtVe7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726401AbfDIBSS (ORCPT + 99 others); Mon, 8 Apr 2019 21:18:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:43370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbfDIBSS (ORCPT ); Mon, 8 Apr 2019 21:18:18 -0400 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F19321841; Tue, 9 Apr 2019 01:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554772697; bh=rLjHczM1eoSRrpHR2Rcw+V0t8QCKzoYFvPsJ1LtNbQA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZeYQtVe7pbmE3fqefs/62T4OIAc+kTJMvRjZ10UnRnuFQdKRcs5LmlZsk0Y0dUdTz XHptHdz/4pnWW5XugeSvnXi19Mj9hVLzjJ+7Vo4CZiWMvPWcvbSgWkm2t7fmq6crwr 3PzMei7l6xHeuNBVkzK/jVpQeTgO4zDigvIEIH9E= Received: by mail-qk1-f175.google.com with SMTP id w20so9259219qka.7; Mon, 08 Apr 2019 18:18:17 -0700 (PDT) X-Gm-Message-State: APjAAAUMuJ0IgUG8OCGYj5yUiXdFnvkePz50E1pvXgoK3SvWqz1aTdKz j591PbAckPFQ6mPbX5LmNIN/yvoaavJNBAoZhQ== X-Received: by 2002:a37:7183:: with SMTP id m125mr11798299qkc.119.1554772696266; Mon, 08 Apr 2019 18:18:16 -0700 (PDT) MIME-Version: 1.0 References: <1554303165-24813-1-git-send-email-f.suligoi@asem.it> <5ca84214.1c69fb81.e3ace.21e5@mx.google.com> <20190406125550.GA7480@piout.net> <58b8e1bc2b064abcb67db04369cf9c6e@asem.it> In-Reply-To: <58b8e1bc2b064abcb67db04369cf9c6e@asem.it> From: Rob Herring Date: Mon, 8 Apr 2019 20:18:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: rtc: add battery-low-hw-alarm property To: Flavio Suligoi Cc: Alexandre Belloni , Alessandro Zummo , Mark Rutland , "linux-rtc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 8, 2019 at 2:22 AM Flavio Suligoi wrote: > > HI, > > > On 06/04/2019 01:07:13-0500, Rob Herring wrote: > > > On Wed, Apr 03, 2019 at 04:52:44PM +0200, Flavio Suligoi wrote: > > > > Some RTC devices have a battery-low automatic detection circuit. > > > > The battery-low event is usually reported with: > > > > > > > > - a bit change in a RTC status register > > > > - a hw signaling (generally using an interrupt generation), changing > > > > the hw level of a specific pin; > > > > > > > > The new property "battery-low-hw-alarm" enable the RTC to generate the > > > > hw signaling in case of battery-low event. > > > > > > > > Signed-off-by: Flavio Suligoi > > > > --- > > > > Documentation/devicetree/bindings/rtc/rtc.txt | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt > > b/Documentation/devicetree/bindings/rtc/rtc.txt > > > > index a97fc6a..f93a44d 100644 > > > > --- a/Documentation/devicetree/bindings/rtc/rtc.txt > > > > +++ b/Documentation/devicetree/bindings/rtc/rtc.txt > > > > @@ -31,6 +31,9 @@ below. > > > > expressed in femto Farad (fF). > > > > The default value shall be listed (if > > optional), > > > > and likewise all valid values. > > > > +- battery-low-hw-alarm : Enable the "battery-low" output pin. This > > function > > > > + is available on the following devices: > > > > + - pcf2127 - pin used for alarm: INTn > > > > > > Boolean? If there's cases where which pin is selectable, then we'd need > > > this to take a value. Not sure how likely that is? > > > > > > > Indeed, there is at least the pcf85363 that has two possible pins for > > that interrupt. How would you select the pin then? a zero based index? a > > string? I prefer an index. > I think the string could be clearer for the final user and would give > more freedom for future changes. > For example, we can call this property, instead of "battery-low-alarm" or > "low-voltage-alarm", simply: "alarm-pin_1" and then the string argument > can describe the function used; for example: > > alarm-pin_1 = "backup-supply-low-voltage-alarm"; > alarm-pin_2 = "......"; How many pins and functions then? And how does this relate to any interrupts? Rob