Will the ADC raw values always be at /sys/bus/iio/devices/iio:device0 ?

Well, I realise they won't *always* be there but what I mean is it
reasonable to hard code the address into a program?

The last part of the path, the iio:device0 bit, is actually a symbolic
link to a much deeper and messier looking path in /sys/devices so
presumably something creates this symbolic link when ADC is enabled to
give a more 'generic' way to get to the raw ADC values.

cl@isbd.net wrote:

Well, I realise they won't *always* be there but what I mean is it
reasonable to hard code the address into a program?

The last part of the path, the iio:device0 bit, is actually a symbolic
link to a much deeper and messier looking path in /sys/devices so
presumably something creates this symbolic link when ADC is enabled to
give a more 'generic' way to get to the raw ADC values.

Bump, no one knows or is interested?

It depends on the driver you are using, check the docs of your hardware to see. But typically the driver would not change so yes you could hard code this.