iio: add IIO_MASSCONCENTRATION channel type
Measuring particulate matter in ug / m3 (micro-grams per cubic meter) is de facto standard. Existing air quality sensors usually follow this convention and are capable of returning measurements using this unit. IIO currently does not offer suitable channel type for this type of measurements hence this patch adds this. In addition, extra modifiers are introduced used for distinguishing between fine pm1, pm2p5 and coarse pm4, pm10 particle measurements, i.e IIO_MOD_PM1, IIO_MOD_PM25 and IIO_MOD_PM4, IIO_MOD_PM10. pmX consists of particles with aerodynamic diameter less or equal to X micrometers. Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:

committed by
Jonathan Cameron

parent
f1b753a0f8
commit
17abc9ec68
@@ -87,6 +87,7 @@ static const char * const iio_chan_type_name_spec[] = {
|
||||
[IIO_GRAVITY] = "gravity",
|
||||
[IIO_POSITIONRELATIVE] = "positionrelative",
|
||||
[IIO_PHASE] = "phase",
|
||||
[IIO_MASSCONCENTRATION] = "massconcentration",
|
||||
};
|
||||
|
||||
static const char * const iio_modifier_names[] = {
|
||||
@@ -127,6 +128,10 @@ static const char * const iio_modifier_names[] = {
|
||||
[IIO_MOD_Q] = "q",
|
||||
[IIO_MOD_CO2] = "co2",
|
||||
[IIO_MOD_VOC] = "voc",
|
||||
[IIO_MOD_PM1] = "pm1",
|
||||
[IIO_MOD_PM2P5] = "pm2p5",
|
||||
[IIO_MOD_PM4] = "pm4",
|
||||
[IIO_MOD_PM10] = "pm10",
|
||||
};
|
||||
|
||||
/* relies on pairs of these shared then separate */
|
||||
|
Reference in New Issue
Block a user