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=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 4C6C2C433B4 for ; Tue, 4 May 2021 15:35:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 E4545610FA for ; Tue, 4 May 2021 15:35:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4545610FA 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=desiato.20200630; 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=A8OfPCFrMYS9zLE1s7wDE6BS86YwxyPIiSuudupYj7s=; b=RUD69b+JAQSNeud7d3sr5Ayl0 jwrcwiHuE9vTeVESYId9OMBABURygxYezI2aWVxMOQjcGd5PELPem/so2rHeJfQfP/A8MEd6F/3tO ldYNpYpBPS7hMT12wcIfazeWD6oeOY2lJ3cijnAnV1VjCzNUaNArkjkFoed4Mm0cBz3IxtI+YE2Os 5S3MKU0s0MP3hcwF7NgxC2TWdtPoVj8nhyl263ASRsxrGxIoWUNd/1DSY6JAVqZ4AZqySzgNkrrRq 6vEuXjxLNGzRc4vGvMFNF3ckMSDOvQ1sQppkbUwnZRbDLGP/3VLeF0iwTfmaZ66EJjIKx2Vf0mqnw vm05idH5Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldx3u-00GRuE-H0; Tue, 04 May 2021 15:34:14 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldx3s-00GRtq-6b for linux-arm-kernel@desiato.infradead.org; Tue, 04 May 2021 15:34:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PmQ6iSDPsmJLrRtJn8jtvSnIqJ6BQRJRfbyT2S7mugo=; b=Cv/ywuBWwZqbM8RNOjukbCBNBi 9GwBe1zqDN24yp54YW+7+lFHTRTndDajxj0Dck2K6OzEOjOGRWwcjuVrB8tcUUzuFjMRj9197aeYb TAf/1zfJnGff65adg6hIT3IJzZykpbWKIht1hSjLD3651l/AjASD8/v/2i8gbcqXUSuCE9nJ4Yzp+ Yui93/+7iqGoAOQUVi0+svdIRWhJMnJvHS/HprIjJNhpVO4nuk+xxXzpBv6JHqYXbFz/VCJS9l8E9 1IxPwi/6DS3VkidlBdrgYirrkISlyixeOUpdB65K+UcmDqlGXBtdJhqp1Ww/0Bm9mzK8GAJTbxKKN B6e9FG3g==; Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldx3o-0044Z8-3R for linux-arm-kernel@lists.infradead.org; Tue, 04 May 2021 15:34:10 +0000 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2AB0A1C0007; Tue, 4 May 2021 15:33:59 +0000 (UTC) Date: Tue, 4 May 2021 17:33:59 +0200 From: Alexandre Belloni To: Maxime Ripard Cc: Samuel Holland , Alessandro Zummo , Chen-Yu Tsai , Jernej Skrabec , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: sun6i: Add NVMEM provider Message-ID: References: <20210419014549.26900-1-samuel@sholland.org> <20210430090206.lybmygrt636nysoc@gilmour> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210430090206.lybmygrt636nysoc@gilmour> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_083408_298486_E1ACBC2B X-CRM114-Status: GOOD ( 18.81 ) 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 On 30/04/2021 11:02:06+0200, Maxime Ripard wrote: > Hi, > > On Sun, Apr 18, 2021 at 08:45:49PM -0500, Samuel Holland wrote: > > The sun6i RTC provides 32 bytes of general-purpose data registers. > > They can be used to save data in the always-on RTC power domain. > > The registers are writable via 32-bit MMIO accesses only. > > > > Expose the region as a NVMEM provider so it can be used by userspace and > > other drivers. > > > > Signed-off-by: Samuel Holland > > As far as I understood, you want to use those registers to implement > super-standby? If so, while it makes sense for the kernel to be able to > be able to write to those registers, I guess it would be a bit unwise to > allow the userspace to access it? I would think nvmem is still the proper subsystem. I guess maybe we should have a version of __nvmem_device_get that would ensure exclusive access to a cell, thus preventing userspace accessing it as long a the kernel is using it. -- 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