Re: [RFC v01 1/3] PowerCap: Documentation

From: Srinivas Pandruvada
Date: Mon Aug 05 2013 - 15:44:59 EST

On 08/05/2013 12:09 PM, Jonathan Corbet wrote:
On Fri, 2 Aug 2013 11:08:50 -0700
Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:

+power_uw (rw): Current power counter in micro-watts. Write to this counter
+resets the counter to zero. If the counter can not be reset, then this attribute
+is read-only.
Sorry if I'm slow, but... power is an instantaneous quantity, so why would
you use a counter for it? And why would you want to reset it to zero?
It is an instantaneous value. When I say counter, either in hardware or in driver somewhere,
it is reading energy and using a time delta and continuously updating this value.
Reset to zero will allow user space to reset its internal energy counter used to calculate power.
Our hardware at this time can only provide energy_uj at this time, added power_uw for some future devices.
This was suggested in internal reviews. But based on feedback, we can drop this attribute totally,
till we have a device needing this.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at