Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031090AbcCQQO1 (ORCPT ); Thu, 17 Mar 2016 12:14:27 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45795 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030986AbcCQQOX (ORCPT ); Thu, 17 Mar 2016 12:14:23 -0400 X-Sasl-enc: 093XvdSiEk5eyeDOXsVNuziWKcBVDth6w62fJZaSpOUn 1458231255 Date: Thu, 17 Mar 2016 13:14:12 -0300 From: Henrique de Moraes Holschuh To: Eddie Huang Cc: Srinivas Kandagatla , Maxime Ripard , linux-mediatek@lists.infradead.org, andrew-ct.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: NVMEM usage question Message-ID: <20160317161412.GA24806@khazad-dum.debian.net> References: <1457956899.20370.25.camel@mtksdaap41> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457956899.20370.25.camel@mtksdaap41> X-GPG-Fingerprint1: 4096R/39CB4807 C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 24 On Mon, 14 Mar 2016, Eddie Huang wrote: > > Mediatek PMIC chip have some spare registers used to store information. > The value of these registers will exist until user unplug battery or > battery depletion. One of our usage example is store battery utilization i.e. like battery-backed raid caches. > in these spare registers. We want to implement NVMEM driver to > read/write sparse registers, but binding document describe NVMEM is for > "Non-volatile memory", and for hardware like eeprom, efuse. Since the Users will expect nvmem to not go away on battery drain, so I don't think it would be the best fit, semantically speaking. Unless this is common enough that it would make sense to have a generic quasi-non-volatile profile for nvmem, and publish that constraint to userspace in a standard way... -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh