From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B048AC38142 for ; Wed, 1 Feb 2023 16:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZZ8iGc94STYA7FDm3rfJO2plvAQTzgm/SZmrH8aGvV0=; b=4quhyv38JgRAID 6mw5Bhq7pIwFcZDwWBpJrO62cpKS3cCrMUsfMTXX3ZkgNNXiNx/dObEch8MQXBAunQfdhUfQFAhG8 s4sYFMOWW8cHZlhCoMwSJlQooo5KPdcG3Q8ecAuRU/oBq72bOvm3Cb5AEizGEiCKE/wwEn2zOTmdu yAI8PvzijaufbAAsV244uWVaRNECUywIJPvCCzd+Ac+cdVG80IRw7q26QbN+nm7/Y9eh4CyfmXK5j 9I+PdttcnEdRAHtxpxgTMsCeyhms9pLPNYj+9OME6HNAYxk4kJKMFdRN9khdmhSq8eCSNENgR/8LO XLx9PNj1Q6mXr9EUHvOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNFlt-00CkdW-E4; Wed, 01 Feb 2023 16:15:41 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNFlq-00Ckbg-OH for linux-arm-kernel@lists.infradead.org; Wed, 01 Feb 2023 16:15:40 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1B229E000F; Wed, 1 Feb 2023 16:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675268128; 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=mGkI6VBUfU7G1GLfIXROj8CxpsFVux3g4YSmKzDHPfk=; b=YoNnRYoF/V00IyZstAOjYuP5TavqKiNnnDOCsMegk/qiSq5A+oUD10/t7EcToMZxUvpB4a FP6WRD6eBVE4kiC7mCi6sQ5EfIXh0o0KsiFJnJOq9l+zaD/XRh2qEhmogp87tiAQjBlaRy h9LrsuJgkApp/Wi7oe4c3F3BRAcl5BUZKq7A5pLYeNXyi8+r+OnoMj2tNvf4EtByd6bUBc j31a5bCoDvsEtrgupkHJeLGJ5AdSlWlmGL7VyvN4TFSOJ4OFnEwRYCnobVQGqxmvxICQr/ l7uk30zI9lfHfdd+2GA8HsBO+I7QaKIhL4CAxmsnAK10QTdGGpQSxRBMOE0wgg== Date: Wed, 1 Feb 2023 17:15:26 +0100 From: Alexandre Belloni To: Frieder Schrempf Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Frieder Schrempf , Alessandro Zummo , Krzysztof Kozlowski , Rob Herring , Sascha Hauer , Shawn Guo Subject: Re: [PATCH 0/7] Enable backup switch mode on RTCs via devicetree Message-ID: References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230201143431.863784-1-frieder@fris.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_081538_965420_35010C91 X-CRM114-Status: GOOD ( 18.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, You can't do that, this breaks an important use case and it is the reason why I didn't use device tree in the beginning. What is wrong with setting BSM from userspace? You will anyway have to set the time and date from userspace for it to be saved. On 01/02/2023 15:34:22+0100, Frieder Schrempf wrote: > From: Frieder Schrempf > > Some RTC devices like the RV3028 have BSM disabled as factory default. > This makes the RTC quite useless if it is expected to preserve the > time on hardware that has a battery-buffered supply for the RTC. > > Let boards that have a buffered supply for the RTC force the BSM to the > desired value via devicetree by setting the 'backup-switch-mode' property. > > That way the RTC on the boards work as one would expect them to do without > any per-board intervention through userspace tools to enable BSM. > > Frieder Schrempf (7): > dt-bindings: rtc: Move RV3028 to separate binding file > dt-bindings: rtc: Add backup-switch-mode property > dt-bindings: rtc: microcrystal,rv3032: Add backup-switch-mode property > rtc: Move BSM defines to separate header for DT usage > rtc: class: Support setting backup switch mode from devicetree > arm64: dts: imx8mm-kontron: Remove useless trickle-diode-disable from > RTC node > arm64: dts: imx8mm-kontron: Enable backup switch mode for RTC on OSM-S > module > > .../bindings/rtc/microcrystal,rv3028.yaml | 60 +++++++++++++++++++ > .../devicetree/bindings/rtc/rtc.yaml | 7 +++ > .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 - > .../dts/freescale/imx8mm-kontron-osm-s.dtsi | 3 +- > drivers/rtc/class.c | 14 +++++ > include/dt-bindings/rtc/rtc.h | 11 ++++ > include/uapi/linux/rtc.h | 6 +- > 7 files changed, 95 insertions(+), 8 deletions(-) > create mode 100644 Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml > create mode 100644 include/dt-bindings/rtc/rtc.h > > -- > 2.39.1 -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel