Re: [PATCH] iio: adc: ti-ads8688: use the auto sequence feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2018-06-03 17:28, Jonathan Cameron wrote:
On Wed, 30 May 2018 23:18:21 +0200
Sean Nyekjaer <sean.nyekjaer@xxxxxxxxx> wrote:

The TI ADS8688 have a auto sequence feature that allows
to continuesly reading new values from the chosen channels.
Lets enable it and we will be able to sample at the double speed
vs the old implementation

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@xxxxxxxxx>

hmm. Technically it's an ABI change as someone may be relying on the
ability to do sysfs reads whilst we are also using the chardev interface.
However, I doubt anyone is so lest see if anyone notices ;)

One comment inline. Otherwise looks fine to me.

With care, we could gotten the speed up without using autosequencing
but that doesn't really matter as that isn't what we were doing previously.

Thanks,

Jonathan

---
Oh i din't know that we must always be able to read from sysfs, with this adc the auto sequencing will stop if a manual read is done :-( Maybe I could change it so the auto trigger mode will still be calling the channels manually? That way we will have the same amount of channels, but greater freedom to be able to do sysfs reads...

+static int ads8688_update_scan_mode(struct iio_dev *indio_dev,
+	const unsigned long *active_scan_mask)
+{
+	int scan_count;
+
+	scan_count = bitmap_weight(active_scan_mask, indio_dev->masklength);

What is scan_count for?
Woops, just some cp for debugging :-) Will remove it

/Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux