Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1136691ybg; Mon, 27 Jul 2020 08:47:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr0erriMHdtwhXv/WkmOuhyf580p9Y8kD4C7MXPN24sS9MS+TiKBOfWzslr7H3NbPVBDWO X-Received: by 2002:a17:906:54d3:: with SMTP id c19mr3345592ejp.408.1595864825602; Mon, 27 Jul 2020 08:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595864825; cv=none; d=google.com; s=arc-20160816; b=uzea1yOsu0xSeUpkoL5T1rkR35J9Sy4/3KewRS/ruM1W+kA26PtewmLMi9989YWAXZ zohS3+vULAmwLFJVkE4XU3rtZIzd41DCUMyUnWoxtQLGhpPY8uHLXubGiqoY6sdvhbws 73js8LVd4y6ouxTcbdVxnSBLxD1BAvPKQ8CBfx47QAr9TB5909w1xE5Ge+rcl8FOkQ/M BrpoOIXfd3nDNU1BX8HLGz/WbZSI3dX8XAT6J4ErL6X1bP8W519QThx/+fX/azQTXwF5 lvqn+cGcZxIT5Bgjvjw3TyXrdG1Nvgm5tme+vi2qtIcyTyI1vuIMv6fYGHvOX59vVP6Q 2tgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DTiJ9DCKSihE4ycmCvc3MBz3EguzZmtKetvhRYWhQ6s=; b=aEFsvgJw2TbjMJDlFE0VRm5k8K4ZcwARmCzkGyioXWqFDYAjRgKSNnyaL58Lhe8gLX hZwiOH1+mcc8+E37aa3/+wjrRQupB+F8o5h6JebfMnniG8KgunWyACRl1t6kbJQ17vvq f4+ebf8fTo4jcOlhcKY+5ktl34lF0p3z5mRVDHHao47UazGFcVtzwxtNrgZy4B8JAf3D /EpSEdtEvXdS0ZdfVGg8fU2t6a+UUYHk/lq2GUZ53YyVLnZDB+UHhGYMBUU16sCZSFrX DkadPiMTFqbmK6lcOdmSD9VCzH7ei8Ge2diQjgR1R8RIfc9FdVBVzsXsMSJxSwsC5ic4 0t6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xt1tz2xi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si6004221ejf.256.2020.07.27.08.46.43; Mon, 27 Jul 2020 08:47:05 -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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xt1tz2xi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730972AbgG0Pnm (ORCPT + 99 others); Mon, 27 Jul 2020 11:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbgG0Pnm (ORCPT ); Mon, 27 Jul 2020 11:43:42 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33188C061794; Mon, 27 Jul 2020 08:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DTiJ9DCKSihE4ycmCvc3MBz3EguzZmtKetvhRYWhQ6s=; b=xt1tz2xi4gFW1RBYpqonj0wO2 Vhy82d52V/bO7PkJUW4NbK7p9SnY59C+3iPXG6bdK7L6MDy75jmSLRmUK1LT/rrwDfbmRXEmBoML/ l6ffTZkhsJitXdhUeWM2HSCSHhHGmHEbY682TCBWO+mny9ybadR8497BWvxGvccE4pkyqT8vOu580 +dUp6Gs8QEkDsjnraaOBYbQNvY1rjID70opjpsqtj/cwXf0XYSilmK+kFAgx82cteXuOGB6acUuAo avLfdgmogGQ8hMyq1c6RmT+5iAn2y6HV3hd60P2oNixKLymg+h7oC7moU4uSXN/oBh3MI7tl0pKT3 NAaTsyBYw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44858) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k05Hs-00031S-09; Mon, 27 Jul 2020 16:43:36 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1k05Hr-0003mQ-5e; Mon, 27 Jul 2020 16:43:35 +0100 Date: Mon, 27 Jul 2020 16:43:35 +0100 From: Russell King - ARM Linux admin To: Alexandre Belloni Cc: Rob Herring , miguelborgesdefreitas@gmail.com, a.zummo@towertech.it, baruch@tkos.co.il, 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: <20200727154335.GL1551@shell.armlinux.org.uk> References: <20200719145028.3370-3-miguelborgesdefreitas@gmail.com> <20200720112401.4620-1-miguelborgesdefreitas@gmail.com> <20200720112401.4620-2-miguelborgesdefreitas@gmail.com> <20200723174905.GA596242@bogus> <20200723195755.GV3428@piout.net> <20200727094553.GH1551@shell.armlinux.org.uk> <20200727144938.GC239143@piout.net> <20200727152439.GK1551@shell.armlinux.org.uk> <20200727154104.GE239143@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200727154104.GE239143@piout.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2020 at 05:41:04PM +0200, Alexandre Belloni wrote: > On 27/07/2020 16:24:39+0100, Russell King - ARM Linux admin wrote: > > On Mon, Jul 27, 2020 at 04:49:38PM +0200, Alexandre Belloni wrote: > > > On 27/07/2020 10:45:53+0100, Russell King - ARM Linux admin wrote: > > > > > This is but this shouldn't be a DT property as it has to be changed > > > > > dynamically. I'm working on an ioctl interface to change this > > > > > configuration. > > > > > > > > Why does it need to be changed dynamically? If the hardware components > > > > are not fitted to allow the RTC to be safely used without DSM, then > > > > why should userspace be able to disable DSM? > > > > > > For RTCs with a standby mode, you want to be able to return to standby > > > mode. > > > > > > That would happen for example after factory flashing in that common use > > > case: > > > - the board is manufactured > > > - Vbackup is installed, the RTC switches to standby mode > > > - the board is then booted to flash a system, Vprimary is now present, > > > the RTC switches to DSM. > > > > > > At this point, if the board is simply shut down, the RTC will start > > > draining Vbackup before leaving the factory. Instead, we want to be able > > > to return to standby mode until the final user switches the product on > > > for the first time. > > > > I don't think you're understanding what's going on with this proposed > > patch. The cubox-i does work today, and the RTC does survive most > > power-downs. There are situations where it doesn't. > > > > So, let's take your process above. > > > > - the board is manufactured > > - Vbackup is installed, the RTC switches to standby mode > > - the board is then booted to flash a system, Vprimary is now present > > - the board is powered down. the RTC _might_ switch over to battery > > if it notices the power failure in time, or it might not. A random > > sample of units leaving the factory have the RTC in standby mode. > > Others are draining the battery. > > > > I'm not saying what you propose isn't a good idea. I'm questioning > > why we should expose this in the generic kernel on platforms where > > it's likely to end up with the RTC being corrupted. > > > > Note that I didn't say we should expose settings that are not working > but it is a different discussion. It isn't a different discussion - that is exactly what the point of my emails to you all along have been! So, can we please have that discussion, it is pertinent to this patch. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!