Lines Matching +full:high +full:- +full:accuracy
1 // SPDX-License-Identifier: GPL-2.0-only
3 * si7020.c - Silicon Labs Si7013/20/21 Relative Humidity and Temp Sensors
47 chan->type == IIO_TEMP ? in si7020_read_raw()
54 * Humidity values can slightly exceed the 0-100%RH in si7020_read_raw()
57 if (chan->type == IIO_HUMIDITYRELATIVE) in si7020_read_raw()
61 if (chan->type == IIO_TEMP) in si7020_read_raw()
71 * accuracy. in si7020_read_raw()
72 * Relative humidity will be 0.0032959% too high and in si7020_read_raw()
73 * temperature will be 0.00277344 degrees too high. in si7020_read_raw()
74 * This is no big deal because it's within the accuracy of the in si7020_read_raw()
77 if (chan->type == IIO_TEMP) in si7020_read_raw()
78 *val = -4368; /* = -46.85 * (65536 >> 2) / 175.72 */ in si7020_read_raw()
80 *val = -786; /* = -6 * (65536 >> 2) / 125 */ in si7020_read_raw()
86 return -EINVAL; in si7020_read_raw()
112 if (!i2c_check_functionality(client->adapter, in si7020_probe()
115 return -EOPNOTSUPP; in si7020_probe()
121 /* Wait the maximum power-up time after software reset. */ in si7020_probe()
124 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); in si7020_probe()
126 return -ENOMEM; in si7020_probe()
131 indio_dev->name = dev_name(&client->dev); in si7020_probe()
132 indio_dev->modes = INDIO_DIRECT_MODE; in si7020_probe()
133 indio_dev->info = &si7020_info; in si7020_probe()
134 indio_dev->channels = si7020_channels; in si7020_probe()
135 indio_dev->num_channels = ARRAY_SIZE(si7020_channels); in si7020_probe()
137 return devm_iio_device_register(&client->dev, indio_dev); in si7020_probe()