analogdevicesinc / iio-oscilloscope

A GTK+ based oscilloscope application for interfacing with various IIO devices
https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope
GNU General Public License v2.0
266 stars 145 forks source link

OSC (especially DMM plugin) should identify devices by ID and not by name #335

Open dNechita opened 3 years ago

dNechita commented 3 years ago

There are situations where multiple IIO devices with the same name exists and in those cases there is no way to differentiate the devices if looking them up by name.

nunojsa commented 3 years ago

In theory this is the first thing to try iio_device_get_label()... in the kernel, IIO labels are how devices should be distinguished when multiple devices exist. We were doing this by setting the device name with the devicetree node name which is not how things should be done in IIO. Now that libiio supports labels, we can start doing this properly (in new drivers)... In #323 , I'm already making use of them :). Unfortunately for 2019_R2 we cannot use it as we cannot assume that 2019_R2 libiio has support for it

rgetz commented 3 years ago

yeah, I would agree - by label, by name (if no duplicates), and by ID as the last resort...

nunojsa commented 3 years ago

I have started to do it with #345. Maybe the DMM plugin is the next on the list...