Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965708AbcCPGut (ORCPT ); Wed, 16 Mar 2016 02:50:49 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:32886 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934569AbcCPGur (ORCPT ); Wed, 16 Mar 2016 02:50:47 -0400 Subject: Re: NVMEM usage question To: Eddie Huang , Maxime Ripard References: <1457956899.20370.25.camel@mtksdaap41> Cc: linux-mediatek@lists.infradead.org, andrew-ct.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Srinivas Kandagatla Message-ID: <56E90245.1040203@linaro.org> Date: Wed, 16 Mar 2016 06:50:45 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1457956899.20370.25.camel@mtksdaap41> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 824 Lines: 26 On 14/03/16 12:01, Eddie Huang wrote: > Hi, > > 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 > 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 > usage here is some kind of "battery backup memory", but not real > non-volatile memory, is NVMEM driver suitable for this case ? If this battery usage information can be retrieved after full power cycle, then there should be some sort of non volatile memory involved. If that's the case then you can use the nvmem. --srini > > Eddie > >