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 X-Spam-Level: X-Spam-Status: No, score=-4.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1B38C433DF for ; Tue, 25 Aug 2020 20:10:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81E1220738 for ; Tue, 25 Aug 2020 20:10:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eOLoLm5k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81E1220738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=XzDfd5RWXNo6r3BifEH1FUQcsz4NUzZzcb0QLtEES90=; b=eOLoLm5ky2lRJzBFhzRBB5zRE d4RgPG5xWhhBLR4ztVezevm4d5e7jZ4OQgUBTDFUbxgVBHxKSVOgJBQuoorFxTwws4gnpX3uHW5oP FvU08ZXmyUrJy1KV2dhgjQNNAwYZEVp4b4p4hlvGknc9W43SY6tv+xuQkkWgvEtJsDMLtKFEHJQvl vWkfv/AKDlQrVEyAQZ/cFVBeqRZKEf+goi/OhF9FHX4sBvk72ujfAmNUB3+fl5OxEQOBipycriS2P HbSq+ul7DGuJou98/vuqlimInwFrQkyEhF47Vp5CR48cJNcUneMmpN5+iUW729VlV3X0+vZ3+PaTc q7JSfU3tw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAfFf-0004CK-Lt; Tue, 25 Aug 2020 20:09:03 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAfFX-0004Av-C6 for linux-arm-kernel@lists.infradead.org; Tue, 25 Aug 2020 20:08:56 +0000 X-Originating-IP: 90.66.108.79 Received: from localhost (lfbn-lyo-1-1932-79.w90-66.abo.wanadoo.fr [90.66.108.79]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 04B8F20007; Tue, 25 Aug 2020 20:08:51 +0000 (UTC) Date: Tue, 25 Aug 2020 22:08:51 +0200 From: Alexandre Belloni To: Miguel Borges de Freitas Subject: Re: [PATCH v2 1/3] dt-bindings: rtc: pcf8523: add DSM pm option for battery switch-over Message-ID: <20200825200851.GI2389103@piout.net> References: <20200723195755.GV3428@piout.net> <20200727094553.GH1551@shell.armlinux.org.uk> <20200727144938.GC239143@piout.net> <20200727152439.GK1551@shell.armlinux.org.uk> <20200727154104.GE239143@piout.net> <20200727154335.GL1551@shell.armlinux.org.uk> <20200727161632.GF239143@piout.net> <20200727173051.GM1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200825_160855_663837_98DB9F0E X-CRM114-Status: GOOD ( 31.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Baruch Siach , a.zummo@towertech.it, Fabio Estevam , Sascha Hauer , Jon Nettleton , Russell King - ARM Linux admin , Linux Kernel Mailing List , devicetree , NXP Linux Team , Sascha Hauer , Shawn Guo , linux-arm-kernel Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27/07/2020 22:13:42+0100, Miguel Borges de Freitas wrote: > Russell King - ARM Linux admin escreveu no dia > segunda, 27/07/2020 =E0(s) 18:30: > > > > On Mon, Jul 27, 2020 at 06:16:32PM +0200, Alexandre Belloni wrote: > > > On 27/07/2020 17:55:50+0200, Jon Nettleton wrote: > > > > > So, can we please have that discussion, it is pertinent to this p= atch. > > > > > > > > > > > > > Thinking about this some more, I believe whether or not an IOCTL > > > > interface is in the works or needed is irrelevant. This patch > > > > describes the hardware and how it is designed and the topic of > > > > discussion is if we need a simple boolean state, or if we need > > > > something that could be used to support dynamic configuration in the > > > > future. I would rather make this decision now rather than keep > > > > tacking on boolean config options, or revisit a bunch of device-tree > > > > changes. > = > For what it's worth I also tend to agree. > The patchset, regardless of the property name (that I admit might be > misleading), is intended at enforcing a mode that the RTC/driver > should use by default. This mode is strongly related to the hardware > definition/implementation and its capabilities. While I understand the > need for the IOCTL interface to solve issues exactly like the > aforementioned factory example, I fail to see how it can be of any > help to solve the problem at hand - as it won't likely configure the > driver to use a different default mode depending on the board. The > IOCTL interface might also allow the userspace to change this property > back to the default mode (000) and end up breaking the RTC operation, > but I guess that's the cost of configurability and, in the end, the > user's responsibility. > Any pointers on how to proceed are appreciated. > = I would think the simpler way to proceed is to have a device specific property indicating that standard mode is not available. From the driver, you can then switch from standard to DSM when this property is present. I think it is difficult to come up with a generic property for that as most other RTCs with level/threshold switching have a fast edge detection feature that is usually enabled by default. So what they would require instead is a property indicating that the voltage is ramping down at a certain rate allowing to disable fast edge detection and saving a bit of power. -- = Alexandre Belloni, 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