Module Name:    src
Committed By:   jmcneill
Date:           Sun May 13 22:58:58 UTC 2018

Modified Files:
        src/sys/dev/i2c: axppmic.c

Log Message:
Battery charge state is invalid until we refresh the first time


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/axppmic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/axppmic.c
diff -u src/sys/dev/i2c/axppmic.c:1.8 src/sys/dev/i2c/axppmic.c:1.9
--- src/sys/dev/i2c/axppmic.c:1.8	Sun May 13 11:13:02 2018
+++ src/sys/dev/i2c/axppmic.c	Sun May 13 22:58:58 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: axppmic.c,v 1.8 2018/05/13 11:13:02 jmcneill Exp $ */
+/* $NetBSD: axppmic.c,v 1.9 2018/05/13 22:58:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014-2018 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.8 2018/05/13 11:13:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.9 2018/05/13 22:58:58 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -554,7 +554,7 @@ axppmic_attach_battery(struct axppmic_so
 	e->private = AXP_SENSOR_BATT_CHARGE_STATE;
 	e->units = ENVSYS_BATTERY_CAPACITY;
 	e->flags = ENVSYS_FMONSTCHANGED;
-	e->state = ENVSYS_SVALID;
+	e->state = ENVSYS_SINVALID;
 	e->value_cur = ENVSYS_BATTERY_CAPACITY_NORMAL;
 	strlcpy(e->desc, "charge state", sizeof(e->desc));
 	sysmon_envsys_sensor_attach(sc->sc_sme, e);

Reply via email to