Skip to content
  • Andreas Klinger's avatar
    iio: bmp280: properly initialize device for humidity reading · eb92b418
    Andreas Klinger authored
    
    
    If the device is not initialized at least once it happens that the humidity
    reading is skipped, which means the special value 0x8000 is delivered.
    
    For omitting this case the oversampling of the humidity must be set before
    the oversampling of the temperature und pressure is set as written in the
    datasheet of the BME280.
    
    Furthermore proper error detection is added in case a skipped value is read
    from the device. This is done also for pressure and temperature reading.
    Especially it don't make sense to compensate this value and treat it as
    regular value.
    
    Signed-off-by: default avatarAndreas Klinger <ak@it-klinger.de>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    eb92b418