iio: pressure: ms5611: add support for MS5607 temperature and pressure sensor

MS5607 is temperature and pressure sensor which hardware is similar to MS5611.
Both sensors share command protocol and support both I2C and SPI serial
protocols. They only differ in compensation algorithms.

Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Tomasz Duszynski
2015-06-23 20:45:48 +02:00
committed by Jonathan Cameron
parent 7cb46c2a06
commit 9690d81a02
5 changed files with 88 additions and 17 deletions

View File

@@ -103,11 +103,13 @@ static int ms5611_spi_probe(struct spi_device *spi)
st->read_adc_temp_and_pressure = ms5611_spi_read_adc_temp_and_pressure;
st->client = spi;
return ms5611_probe(indio_dev, &spi->dev);
return ms5611_probe(indio_dev, &spi->dev,
spi_get_device_id(spi)->driver_data);
}
static const struct spi_device_id ms5611_id[] = {
{ "ms5611", 0 },
{ "ms5611", MS5611 },
{ "ms5607", MS5607 },
{ }
};
MODULE_DEVICE_TABLE(spi, ms5611_id);