Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

new: Support for linux Industrial I/O (iio) #167

Closed
ubergesundheit opened this issue Oct 31, 2017 · 4 comments
Closed

new: Support for linux Industrial I/O (iio) #167

ubergesundheit opened this issue Oct 31, 2017 · 4 comments

Comments

@ubergesundheit
Copy link

Do you plan to add support for interfacing with devices through the Industrial I/O linux subsystem? It features many device drivers already baked into the linux kernel (see here for a list).

I would very much like the idea of using go for reading values from sensors connected through iio.

@maruel
Copy link
Contributor

maruel commented Oct 31, 2017

I wasn't aware so there's no plan. :) If RPi's can get recent drivers (as many seem to have been touched in the past year), it would be interesting.

I looked on a RPi3, ODROID and x64 host running Ubuntu 16.04 and failed to see /sys/bus/iio, as documented athttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-iio. It seems like a device tree overlay is needed, which is non-trivial for users.

If this ever to work out, the plan would be to create a package periph.io/x/periph/host/iio, have it query with whatever interface and populate what is available here.

@ubergesundheit
Copy link
Author

Thank you for your answer. You are right that the interface is not easily enabled. On rasperry pi devices one must configure the dtoverlays in the /boot/config.txt file to enable the devices.

Do you have any tips for implementing the periph.io/x/periph/host/iiopackage? Would it use host/fs?

@maruel
Copy link
Contributor

maruel commented Nov 8, 2017

host/fs exists to enable unit testing so it's a good idea to use it for this reason, but it's not an hard requirement.

You could start in experimental/host/iio and start to work iteratively from there, and then once it's deemed stable enough we can move it back as host/iio. So if you want to commit to implement at least code to have a functional baseline, I'm fine with you start contributing into experimental. You may also want to do an initial prototype on a private branch if you want, just to weed out the very initial key design elements. It may be challenging to design especially as I think you may need to create a "registry of devices found". It's as you prefer.

As part of this task, another important point will be to document how to enable it on https://github.com/periph/website, not sure where exactly yet.

Note that this code could live in a separate repository just fine too. Periph is intentionally designed to allow that. It depends on how much velocity you want to have when pushing code.

@maruel maruel changed the title Support for Industrial I/O (iio)? Support for linux Industrial I/O (iio) Dec 6, 2017
@maruel maruel changed the title Support for linux Industrial I/O (iio) new: Support for linux Industrial I/O (iio) Nov 9, 2018
@maruel
Copy link
Contributor

maruel commented Sep 20, 2023

Ported to periph/host#45.

@maruel maruel closed this as completed Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants