diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2024-03-26 00:53:52 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2024-03-26 00:53:52 +0000 |
commit | 60627aceaae2b037ed5bd6f087baf432fd4483e0 (patch) | |
tree | 0a33f4716cc7ff905d6221f7b920c735c35b654a /sys | |
parent | ccf1aed78a506275b1866aa76a0bd6716714b013 (diff) |
amps and watts types
volts felt lonely
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/kstat.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/sys/kstat.h b/sys/sys/kstat.h index 1a94e8d9d82..e2c972cad96 100644 --- a/sys/sys/kstat.h +++ b/sys/sys/kstat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kstat.h,v 1.4 2023/11/16 02:45:20 dlg Exp $ */ +/* $OpenBSD: kstat.h,v 1.5 2024/03/26 00:53:51 dlg Exp $ */ /* * Copyright (c) 2020 David Gwynne <dlg@openbsd.org> @@ -85,6 +85,8 @@ enum kstat_kv_type { KSTAT_KV_T_FREQ, /* frequency (Hz) */ KSTAT_KV_T_VOLTS_DC, /* voltage (uV DC) */ KSTAT_KV_T_VOLTS_AC, /* voltage (uV AC) */ + KSTAT_KV_T_AMPS, /* current (uA) */ + KSTAT_KV_T_WATTS, /* power (uW) */ }; /* units only apply to integer types */ @@ -124,6 +126,8 @@ struct kstat_kv { #define kstat_kv_temp(_kv) (_kv)->kv_v.v_u64 #define kstat_kv_freq(_kv) (_kv)->kv_v.v_u64 #define kstat_kv_volts(_kv) (_kv)->kv_v.v_u64 +#define kstat_kv_amps(_kv) (_kv)->kv_v.v_u64 +#define kstat_kv_watts(_kv) (_kv)->kv_v.v_u64 #ifdef _KERNEL |