Skip to contentSkip to conversation

iio: srf08: add sensor type srf10

PATCH Superseded Andreas Klinger 1 participant 1 message Aug 14, 2017

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Andreas Klinger

author maintainer
#0 lore raw

PATCH v2 4/5 iio: srf08: add sensor type srf10

Ultrasonic sensor srf10 is quite similar to srf08 and now also supported by the driver as device tree compatible string.

It was necessary to prepare the source for supplementary sensors. This is done by enum srf08_sensor_type.

The most significiant difference between srf08 and srf10 is another range and values of register gain (in the driver it's call sensitivity). Therefore the array of it is extended and dependent of the sensor type.

---
 drivers/iio/proximity/Kconfig |  4 +--
 drivers/iio/proximity/srf08.c | 59 ++++++++++++++++++++++++++++++++++---------
 2 files changed, 49 insertions(+), 14 deletions(-)
drivers/iio/proximity/Kconfig +2 -2
index 5b81a8c9d438..df33ccc0d035 100644
@@ -57,10 +57,10 @@ config SX9500
 	  module will be called sx9500.
 
 config SRF08
-	tristate "Devantech SRF08 ultrasonic ranger sensor"
+	tristate "Devantech SRF08/SRF10 ultrasonic ranger sensor"
 	depends on I2C
 	help
-	  Say Y here to build a driver for Devantech SRF08 ultrasonic
+	  Say Y here to build a driver for Devantech SRF08/SRF10 ultrasonic
 	  ranger sensor. This driver can be used to measure the distance
 	  of objects.
 
drivers/iio/proximity/srf08.c +47 -12

130 lines not on this page · raw message

Signature · 4 lines
2.1.4


--