Home | History | Annotate | Download | only in sysmon
History log of /src/sys/dev/sysmon/sysmon_envsys_tables.c
RevisionDateAuthorComments
 1.14  21-Nov-2022  brad A driver for the Bosch BMP280 / BME280 temperature, humidity and
atmospheric pressure sensor. This is an inexpensive to moderately
expensive chip available from a large number of places. The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter. This driver also only supports the
I2C interface and not the SPI interface.

The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
 1.13  27-May-2018  thorpej Add support for light sensors that report Illuminance in lux.
 1.12  18-May-2014  kardel branches: 1.12.26;
add HYT-221/271/939 humidity/temperature I2C sensor
extend envsys(4) framework by %rH (relative humidity)
 1.11  27-Aug-2012  pgoyette branches: 1.11.2; 1.11.4; 1.11.12;
1. Enable use of FMONSTCHANGED events for INDICATOR sensors
2. Update handling of FMONCRITICAL event reporting. The state
transition does not require a corresponding change in value.

With these changes, you can now have an INDICATOR sensor that
reports the presence or absence of a device, and (if the device
is present) separately monitor it for proper functioning.

Should address the concerns expressed recently with the commit
of changes to wmi(4) BBU handling.
 1.10  19-Jun-2011  nonaka branches: 1.10.2; 1.10.8;
Pass table_id to sme_find_table().
 1.9  19-Jun-2011  nonaka fix typo.
 1.8  19-Jun-2011  christos simplify and don't deref NULL.
 1.7  19-Jun-2011  pgoyette Add routine to lookup description tables by description instead of by
type.
 1.6  15-Dec-2010  pgoyette branches: 1.6.6;
Extract searching of description tables into a single function, rather
than duplicating the code every time. Minor reduction in code size
(about 1200 bytes on amd64), no change in functionality.
 1.5  28-Feb-2008  xtraeme branches: 1.5.26;
Add three new values for ENVSYS_DRIVE units:

* ENVSYS_DRIVE_OFFLINE, ENVSYS_DRIVE_CHECK and ENVSYS_DRIVE_BUILD
 1.4  07-Dec-2007  xtraeme branches: 1.4.8; 1.4.12;
Add ENVSYS_DRIVE_MIGRATING for ENVSYS_DRIVE sensors, this is for RAID
volumes that are migrating such as when you change the stripe size.

While I'm here use the same string than we had in the old framework to
report status "online" vs "drive is online", because the sensor might be
a RAID volume and not just a drive.
 1.3  03-Nov-2007  xtraeme branches: 1.3.2; 1.3.4; 1.3.6;
- Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
If the acadapter is not ready, trust the state returned by the battery
device.

Based on suggestion from joerg@.
 1.2  07-Oct-2007  xtraeme branches: 1.2.2; 1.2.4; 1.2.6;
New changes to support the new configuration file format for
envstat(8) and the envsys framework:

- Modify the ENVSYS_SETDICTIONARY ioctl to support the following
plist structure:

<dict>
<key>foo0</key>
<array>
<dict>
<key>index</key>
<string>sensor0</string>
<key>description</key>
<string>cpu temp</string>
...
Another property for this sensor
...
</dict>
...
Another dictionary for other sensor
...
</array>
...
Another device as above
...
</dict>

Multiple devices with multiple sensors can now be specified, that means
that to set the properties only one copyin(9) is needed now.

- Added the ENVSYS_REMOVEPROPS ioctl, that accepts a boolean object
"envsys-remove-props" and when set to true, all properties that were
set previously by ENVSYS_SETDICTIONARY will be removed. That means that
you can now set multiple critical limits, descriptions and all they
will be removed or changed to its default value (for rfact and
description objects).

- Added the 'index' and 'allow-rfact' objects into the sensor dictionaries,
for better interactivity with userland. To know the position of the
sensor and to know if sensor allows to change the rfact.

- Misc cosmetic changes for consistency.

- Use a two clause license for all my code.
 1.1  04-Sep-2007  xtraeme branches: 1.1.2; 1.1.4; 1.1.6;
- Remove ENVSYS_GSTRING and the genstr member from envsys_data_t.
(at least three or four persons were against it).
- Add a new sensor type: ENVSYS_BATTERY_STATE, this uses value_cur
and some predefined values in a static table, like ENVSYS_DRIVE.
- Move all static tables to sysmon_envsys_tables.c and use a function
on it to retrieve a pointer to the struct of the specified type.
- Rename the ENVSYS_FMONDRVSTCHANGED to ENVSYS_FMONSTCHANGED and make
it generic for Battery state and drive sensors (this flag enables
monitoring on these sensors when state has been changed).
- Update sysmon_penvsys_event() to report state changes on
ENVSYS_BATTERY_STATE sensors and remove other type of events, with
PENVSYS_EVENT_STATE_CHANGED they are not necessary anymore.
 1.1.6.5  09-Dec-2007  jmcneill Sync with HEAD.
 1.1.6.4  04-Nov-2007  jmcneill Sync with HEAD.
 1.1.6.3  07-Oct-2007  joerg Sync with HEAD.
 1.1.6.2  02-Oct-2007  joerg Sync with HEAD.
 1.1.6.1  04-Sep-2007  joerg file sysmon_envsys_tables.c was added on branch jmcneill-pm on 2007-10-02 18:28:41 +0000
 1.1.4.1  14-Oct-2007  yamt sync with head.
 1.1.2.2  10-Sep-2007  skrll Sync with HEAD.
 1.1.2.1  04-Sep-2007  skrll file sysmon_envsys_tables.c was added on branch nick-csl-alignment on 2007-09-10 10:55:23 +0000
 1.2.6.5  17-Mar-2008  yamt sync with head.
 1.2.6.4  07-Dec-2007  yamt sync with head
 1.2.6.3  15-Nov-2007  yamt sync with head.
 1.2.6.2  27-Oct-2007  yamt sync with head.
 1.2.6.1  07-Oct-2007  yamt file sysmon_envsys_tables.c was added on branch yamt-lazymbuf on 2007-10-27 11:34:21 +0000
 1.2.4.1  13-Nov-2007  bouyer Sync with HEAD
 1.2.2.2  09-Oct-2007  ad Sync with head.
 1.2.2.1  07-Oct-2007  ad file sysmon_envsys_tables.c was added on branch vmlocking on 2007-10-09 13:42:06 +0000
 1.3.6.1  08-Dec-2007  ad Sync with head.
 1.3.4.4  23-Mar-2008  matt sync with HEAD
 1.3.4.3  09-Jan-2008  matt sync with HEAD
 1.3.4.2  06-Nov-2007  matt sync with HEAD
 1.3.4.1  03-Nov-2007  matt file sysmon_envsys_tables.c was added on branch matt-armv6 on 2007-11-06 23:30:20 +0000
 1.3.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.4.12.1  03-Apr-2008  mjf Sync with HEAD.
 1.4.8.1  24-Mar-2008  keiichi sync with head.
 1.5.26.1  05-Mar-2011  rmind sync with head
 1.6.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.10.8.1  17-Oct-2012  riz Pull up following revision(s) (requested by pgoyette in ticket #545):
etc/powerd/scripts/sensor_indicator: revision 1.5
sys/dev/sysmon/sysmon_envsys_tables.c: revision 1.11
sys/sys/envsys.h: revision 1.32
sys/dev/sysmon/sysmon_envsysvar.h: revision 1.43
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.104
Provide names for the values associated with INDICATOR sensors.
1. Enable use of FMONSTCHANGED events for INDICATOR sensors
2. Update handling of FMONCRITICAL event reporting. The state
transition does not require a corresponding change in value.
With these changes, you can now have an INDICATOR sensor that
reports the presence or absence of a device, and (if the device
is present) separately monitor it for proper functioning.
Should address the concerns expressed recently with the commit
of changes to wmi(4) BBU handling.
Handle any reports of state changes for INDICATORs
 1.10.2.1  30-Oct-2012  yamt sync with head
 1.11.12.1  10-Aug-2014  tls Rebase.
 1.11.4.1  18-May-2014  rmind sync with head
 1.11.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.26.1  25-Jun-2018  pgoyette Sync with HEAD

RSS XML Feed