Skip to contentSkip to conversation

iio: srf08: add buffered to device mode

PATCH Superseded Andreas Klinger 2 participants 2 messages Aug 2, 2017 – Aug 12, 2017

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Andreas Klinger

author maintainer
#0 lore raw

PATCH 6/7 iio: srf08: add buffered to device mode

Add INDIO_BUFFER_TRIGGERED and INDIO_BUFFER_SOFTWARE to device mode

---
 drivers/iio/proximity/srf08.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/proximity/srf08.c +3 -1
index a63c272c3b22..ea238ab1066c 100644
@@ -437,7 +437,9 @@ static int srf08_probe(struct i2c_client *client,
 
 	indio_dev->name = id->name;
 	indio_dev->dev.parent = &client->dev;
-	indio_dev->modes = INDIO_DIRECT_MODE;
+	indio_dev->modes = INDIO_DIRECT_MODE
+				| INDIO_BUFFER_TRIGGERED
+				| INDIO_BUFFER_SOFTWARE;
 
 	/* srf02 is not using sensitivity nor max_range */
 	if (id->driver_data == SRF02)
Signature · 4 lines
2.1.4


-- 
maintainer
#1 lore raw
Quoted 12 lines · On Thu, 3 Aug 2017 01:26:09 +0200 Andreas Klinger <[email protected]> wrote:

Add INDIO_BUFFER_TRIGGERED and INDIO_BUFFER_SOFTWARE to device mode

---
 drivers/iio/proximity/srf08.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/proximity/srf08.c +0 -0
index a63c272c3b22..ea238ab1066c 100644

drivers/iio/proximity/srf08.c static int srf08_probe(struct i2c_client *client, · line 441

Quoted 6 lines
drivers/iio/proximity/srf08.c +2 -1
@@ -437,7 +437,9 @@ static int srf08_probe(struct i2c_client *client,
 
 	indio_dev->name = id->name;
 	indio_dev->dev.parent = &client->dev;
-	indio_dev->modes = INDIO_DIRECT_MODE;
+	indio_dev->modes = INDIO_DIRECT_MODE
+				| INDIO_BUFFER_TRIGGERED

Huh.? Firstly I think only one of these is relevant and secondly should be merged back into the original patch that added the support.

Also the triggered_buffer setup already set it for you...

So all in all, drop this patch.

Jonathan

Quoted 4 lines
drivers/iio/proximity/srf08.c +1 -0
+				| INDIO_BUFFER_SOFTWARE;
 
 	/* srf02 is not using sensitivity nor max_range */
 	if (id->driver_data == SRF02)