units: Add Watt units
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 8 Dec 2020 16:41:42 +0000 (17:41 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Dec 2020 18:50:40 +0000 (19:50 +0100)
As there are the temperature units, let's add the Watt macros definition.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/units.h

index aaf7163..92c234e 100644 (file)
@@ -4,6 +4,10 @@
 
 #include <linux/kernel.h>
 
+#define MILLIWATT_PER_WATT     1000L
+#define MICROWATT_PER_MILLIWATT        1000L
+#define MICROWATT_PER_WATT     1000000L
+
 #define ABSOLUTE_ZERO_MILLICELSIUS -273150
 
 static inline long milli_kelvin_to_millicelsius(long t)