linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NVMEM usage question
@ 2016-03-14 12:01 Eddie Huang
  2016-03-16  6:50 ` Srinivas Kandagatla
  2016-03-17 16:14 ` Henrique de Moraes Holschuh
  0 siblings, 2 replies; 3+ messages in thread
From: Eddie Huang @ 2016-03-14 12:01 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Ripard
  Cc: linux-mediatek, andrew-ct.chen, linux-arm-kernel, linux-kernel

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 ?

Eddie

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NVMEM usage question
  2016-03-14 12:01 NVMEM usage question Eddie Huang
@ 2016-03-16  6:50 ` Srinivas Kandagatla
  2016-03-17 16:14 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2016-03-16  6:50 UTC (permalink / raw)
  To: Eddie Huang, Maxime Ripard
  Cc: linux-mediatek, andrew-ct.chen, linux-arm-kernel, linux-kernel



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
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NVMEM usage question
  2016-03-14 12:01 NVMEM usage question Eddie Huang
  2016-03-16  6:50 ` Srinivas Kandagatla
@ 2016-03-17 16:14 ` Henrique de Moraes Holschuh
  1 sibling, 0 replies; 3+ messages in thread
From: Henrique de Moraes Holschuh @ 2016-03-17 16:14 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Srinivas Kandagatla, Maxime Ripard, linux-mediatek,
	andrew-ct.chen, linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-17 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14 12:01 NVMEM usage question Eddie Huang
2016-03-16  6:50 ` Srinivas Kandagatla
2016-03-17 16:14 ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).