Never used since import and probably just ported over from NetBSD as-is; "design-capacity" does not exist in the device tree binding. "monitor-interval-ms" defaults to 250ms as per binding and could be used in the sensor_task_register() call, but the framework only supports whole seconds and I see no advantage changing our current poll interval of 5s.
Linux doesn't bother with "design-capacity" either but incorporates "monitor-interval-ms" in their SOC readings for example. NetBSD reads "design-capacity" but does not use it, it also reads the old "monitor-interval" (seconds, not "-ms") and passes its unchanged value as event timeout to sysmon_envsys_register(9), their equivalent to our sensor_task_register(). Feedback? Objections? OK? Index: cwfg.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/cwfg.c,v retrieving revision 1.5 diff -u -p -r1.5 cwfg.c --- cwfg.c 1 Apr 2021 10:34:21 -0000 1.5 +++ cwfg.c 1 Apr 2021 10:47:33 -0000 @@ -89,16 +89,10 @@ struct cwfg_softc { uint8_t sc_batinfo[BATINFO_SIZE]; - uint32_t sc_monitor_interval; - uint32_t sc_design_capacity; - struct ksensor sc_sensor[CWFG_NSENSORS]; struct ksensordev sc_sensordev; }; -#define CWFG_MONITOR_INTERVAL_DEFAULT 5000 -#define CWFG_DESIGN_CAPACITY_DEFAULT 2000 - int cwfg_match(struct device *, void *, void *); void cwfg_attach(struct device *, struct device *, void *); @@ -180,11 +174,6 @@ cwfg_attach(struct device *parent, struc return; } free(batinfo, M_TEMP, len); - - sc->sc_monitor_interval = OF_getpropint(sc->sc_node, - "cellwise,monitor-interval-ms", CWFG_MONITOR_INTERVAL_DEFAULT); - sc->sc_design_capacity = OF_getpropint(sc->sc_node, - "cellwise,design-capacity", CWFG_DESIGN_CAPACITY_DEFAULT); if (cwfg_init(sc) != 0) { printf(": failed to initialize device\n");