Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1519993ybh; Thu, 23 Jul 2020 10:52:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2rxS/U5ZguTFK+99Lp+R1i67iopldV5h4TpDXJJp/WOkQKcX+EOtGE7VlV4vz4LoY5RZe X-Received: by 2002:a05:6402:30b2:: with SMTP id df18mr5339298edb.229.1595526755556; Thu, 23 Jul 2020 10:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595526755; cv=none; d=google.com; s=arc-20160816; b=sE0vopdNi4UZiyKt6iw/qeMdVmAhkKzfIMJNHqiXcuBcgH33vP6So4bx8MlrHnz3GZ SuId4iTXgwnD1S6gxPP2SKLVbiFC9D+q+0ZyJC7Q5n82hMeSrHOmsEvQBH0kVUz2sU65 l3l5Xy5u69OmZPl4qFhQO5+A66I1Sbnk5aU1h+e40G0JYh/+7qzzfesLaY4tLJR+5212 xTAGJmEMKdhKYbBjcn+DS3agY9ik5mHf4K7QXNSA/hW8Q2Y627/Gk4nIlMpPcFcmQIQg X0hrqm+5NFDVJoEQ5AW5Gej2fs8S3oa19wl6RSUEgI9t6HyQGLCEN8El/5Avwa0dkXt/ F9UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2YqHLx33D3lKQvsVIeu4fr2sY1tMGjPB3BoYpQvDkyk=; b=Q1rxY+z0ZrercAjiParfvmCIIJZmpcero0RUrmC2OPXM66EAqNJSNAUhLygHVMaUGS p4tzagApPnWt+5wOsIJ+NEGVB+iLIlXCtlbaMaLPyQ+e5eLUfX0e69vnSALt+mv95ix3 D+4UQKjw/YWnLlDa4ToJ/A8Hnfr08PB7j6vovQRAWqsoS8HESNt2iXWOdBvT79xdx0ug QUDPfIEx41XeCLYbsxU1JTVmb4XObwTpV3Z2+PJsr/mRGF07ooM3FogjUQlXOqzlzEXv HMuxqPajDKU0dHewq0Gt0B3N0GBNwpl+BZp+gXEihnbinT5Jpz6W3Wgk8VjcTjneGfTl QD/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id w17si2430193ejq.743.2020.07.23.10.52.13; Thu, 23 Jul 2020 10:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730131AbgGWRtI (ORCPT + 99 others); Thu, 23 Jul 2020 13:49:08 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:34263 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbgGWRtH (ORCPT ); Thu, 23 Jul 2020 13:49:07 -0400 Received: by mail-io1-f66.google.com with SMTP id q74so7181067iod.1; Thu, 23 Jul 2020 10:49:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2YqHLx33D3lKQvsVIeu4fr2sY1tMGjPB3BoYpQvDkyk=; b=VcOXQGj8cS4Hu1inEHWtMPIDB9k7pUYZacGscPw3jELZxt33U2XFuPpQ4OkkG4bA9J C+sfM9+bFa1kJcAayLq8wS5+rgrcVUz84s/whdM4LzujO97d5GN2WHs+m7btQI0R4UOU DvoewFAJBy9RVyyapuW2pPjM8PFdQB3Ibjv1mHWZtPu/I6Aze8qv5LL19NusqNt3uKRn DBYiSCc3izmKCwM0l9JzChiKMv7F7RQdtq1PSOndxx2lObmVqMlpT4/nRWP1Usc3sJfm 4Cv0ZbtUkMdtvOAp3/xFjwgUlseZ1mt1Cr2ywuBMngVXN/mvVUagm4GiyJS2HUQodBrK tylQ== X-Gm-Message-State: AOAM531e2OZNW09HhsrbBHe31zzCKYbKfSsu8HZN4UAI/F5PnzH52NU5 J9QgTcrA1tsQpcnbVeGsprA8tO7LyA== X-Received: by 2002:a02:cb97:: with SMTP id u23mr6003181jap.113.1595526546930; Thu, 23 Jul 2020 10:49:06 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id v10sm1797167ilj.40.2020.07.23.10.49.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 10:49:06 -0700 (PDT) Received: (nullmailer pid 598211 invoked by uid 1000); Thu, 23 Jul 2020 17:49:05 -0000 Date: Thu, 23 Jul 2020 11:49:05 -0600 From: Rob Herring To: miguelborgesdefreitas@gmail.com Cc: a.zummo@towertech.it, baruch@tkos.co.il, linux@armlinux.org.uk, alexandre.belloni@bootlin.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] dt-bindings: rtc: pcf8523: add DSM pm option for battery switch-over Message-ID: <20200723174905.GA596242@bogus> References: <20200719145028.3370-3-miguelborgesdefreitas@gmail.com> <20200720112401.4620-1-miguelborgesdefreitas@gmail.com> <20200720112401.4620-2-miguelborgesdefreitas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200720112401.4620-2-miguelborgesdefreitas@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 12:23:59PM +0100, miguelborgesdefreitas@gmail.com wrote: > From: Miguel Borges de Freitas > > This adds direct-switching mode as a configurable DT flag for > RTC modules supporting it (e.g. nxp pcf8523). > DSM switches the power source to the battery supply whenever the > VDD drops below VBAT. The option is recommended for hw designs > where VDD is always expected to be higher than VBAT. > > Signed-off-by: Miguel Borges de Freitas > --- > Changes in v2: > - Added extended commit message for git history > - Separate dt bindings documentation into a single patch > > Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt | 7 ++++++- > Documentation/devicetree/bindings/rtc/rtc.yaml | 7 +++++++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt b/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt > index 0b1080c..f715a8f 100644 > --- a/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt > +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt > @@ -4,10 +4,14 @@ Required properties: > - compatible: Should contain "nxp,pcf8523". > - reg: I2C address for chip. > > -Optional property: > +Optional properties: > - quartz-load-femtofarads: The capacitive load of the quartz(x-tal), > expressed in femto Farad (fF). Valid values are 7000 and 12500. > Default value (if no value is specified) is 12500fF. > +- pm-enable-dsm: battery switch-over function is enabled in direct > + switching mode. The power failure condition happens when VDD < VBAT, > + without requiring VDD to drop below Vth(sw)bat. > + Default value (if not provided) is the standard mode. > > Example: > > @@ -15,4 +19,5 @@ pcf8523: rtc@68 { > compatible = "nxp,pcf8523"; > reg = <0x68>; > quartz-load-femtofarads = <7000>; > + pm-enable-dsm; > }; > diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml > index ee237b2..a0048f4 100644 > --- a/Documentation/devicetree/bindings/rtc/rtc.yaml > +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml > @@ -47,4 +47,11 @@ properties: > description: > Enables wake up of host system on alarm. > > + pm-enable-dsm: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + Enables the battery switch-over function in direct switching > + mode. Should be set in systems where VDD is higher than VBAT > + at all times. I'm all for common properties, but is this common across vendors? > + > ... > -- > 1.8.3.1 >