Lines Matching +full:pressure +full:- +full:min

1 // SPDX-License-Identifier: GPL-2.0
3 * MS5611 pressure and temperature sensor driver (SPI bus)
22 return spi_write_then_read(st->client, &cmd, 1, NULL, 0); in ms5611_spi_reset()
30 ret = spi_w8r16be(st->client, MS5611_READ_PROM_WORD + (index << 1)); in ms5611_spi_read_prom_word()
44 ret = spi_write_then_read(st->client, buf, 1, buf, 3); in ms5611_spi_read_adc()
54 s32 *temp, s32 *pressure) in ms5611_spi_read_adc_temp_and_pressure() argument
57 const struct ms5611_osr *osr = st->temp_osr; in ms5611_spi_read_adc_temp_and_pressure()
60 * Warning: &osr->cmd MUST be aligned on a word boundary since used as in ms5611_spi_read_adc_temp_and_pressure()
63 ret = spi_write_then_read(st->client, &osr->cmd, 1, NULL, 0); in ms5611_spi_read_adc_temp_and_pressure()
67 usleep_range(osr->conv_usec, osr->conv_usec + (osr->conv_usec / 10UL)); in ms5611_spi_read_adc_temp_and_pressure()
72 osr = st->pressure_osr; in ms5611_spi_read_adc_temp_and_pressure()
73 ret = spi_write_then_read(st->client, &osr->cmd, 1, NULL, 0); in ms5611_spi_read_adc_temp_and_pressure()
77 usleep_range(osr->conv_usec, osr->conv_usec + (osr->conv_usec / 10UL)); in ms5611_spi_read_adc_temp_and_pressure()
78 return ms5611_spi_read_adc(st, pressure); in ms5611_spi_read_adc_temp_and_pressure()
87 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); in ms5611_spi_probe()
89 return -ENOMEM; in ms5611_spi_probe()
93 spi->mode = SPI_MODE_0; in ms5611_spi_probe()
94 spi->max_speed_hz = min(spi->max_speed_hz, 20000000U); in ms5611_spi_probe()
95 spi->bits_per_word = 8; in ms5611_spi_probe()
101 st->reset = ms5611_spi_reset; in ms5611_spi_probe()
102 st->read_prom_word = ms5611_spi_read_prom_word; in ms5611_spi_probe()
103 st->read_adc_temp_and_pressure = ms5611_spi_read_adc_temp_and_pressure; in ms5611_spi_probe()
104 st->client = spi; in ms5611_spi_probe()
106 return ms5611_probe(indio_dev, &spi->dev, spi_get_device_id(spi)->name, in ms5611_spi_probe()
107 spi_get_device_id(spi)->driver_data); in ms5611_spi_probe()