The bmp18x chip family comes in an I2C respectively SPI variant.
Hence, the bmp085 driver was split to support both buses.
Tested-by: Zhengguang Guo <[email protected]>
Reviewed-by: Stefan Nilsson <[email protected]>
Signed-off-by: Eric Andersson <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch includes various cleaning of the bmp085 driver including:
- Whitespaces and alignment fixes
- Minor typos
- Consistency fixes
Reviewed-by: Stefan Nilsson <[email protected]>
Signed-off-by: Eric Andersson <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes following compilation warning:
drivers/misc/bmp085.c: In function ‘bmp085_get_pressure’:
drivers/misc/bmp085.c:238:4: warning: comparison of distinct pointer
types lacks a cast [enabled by default]
Signed-off-by: Bernhard Walle <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
By using the time_is_before_jiffies() macro instead of normal
arithmetic, the jiffies overflow is handled correctly.
Signed-off-by: Bernhard Walle <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This driver adds support for the BMP085 digital pressure sensor from Bosch
Sensortec. It exposes a sysfs api to userspace where pressure and
temperature measurement results can be read from the pressure0_input and
temp0_input file. The chip is able to calculate the average of up to
eight samples to increase the accuracy. This feature can be controlled by
writing to the oversampling file.
The BMP085 digital pressure sensor can measure ambient air pressure and
temperature. Both values can be obtained from sysfs files. The pressure
is measured by reading from pressure0_input. Valid values range from
30000 to 110000 pascal with a resolution of 1 pascal (=0.01 millibar).
temp0_input holds the current temperature in degree celsius, multiplied by
10. This results in a resolution of a tenth degree celsius. Values range
from -400 to 850.
To increase the accuracy, this chip can calculate the average of 1, 2, 4
or 8 samples. This behavior is controlled through the oversampling sysfs
file. Two to the power of the value written to that file specifies how
many samples will be used. Valid values: 0..3.
[[email protected]: fix typo]
[[email protected]: optimize the wait time for the pressure sensor, definition of long is arch dependent so make it u32]
[[email protected]: coding-style fixes]
Signed-off-by: Christoph Mair <[email protected]>
Signed-off-by: Shubhrajyoti D <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Cc: Stefan Schmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>