Robert Nelson <robertcnel...@gmail.com> wrote:
> On Tue, Aug 11, 2015 at 3:42 PM,  <c...@isbd.net> wrote:
> > Robert Nelson <robertcnel...@gmail.com> wrote:
> >> On Fri, Aug 7, 2015 at 11:36 AM,  <c...@isbd.net> wrote:
> >> > I have a BBB running Debian GNU/Linux 7, 3.8.13-bone47 kernel.  I.e.
> >> > pretty standard.
> >> >
> >> > My raw ADC files are to be found at:-
> >> >
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage0_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage1_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage2_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage3_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage4_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage5_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage6_raw
> >> >     /sys/devices/ocp.3/44e0d000.tscadc/tiadc/iio:device0/in_voltage7_raw
> >> >
> >> > Currently I use a find() function written in python which walks the
> >> > /sys/devices tree to find these files, but it's very slow.  If I hard
> >> > code the file names how often, if at all, will they need changing?
> >> >
> >> > ... and/or is there an easier way to find them, i.e. is there a
> >> > configuration file somewhere that tells me where they are (or at least
> >> > the non-constant bits of the path)?
> >>
> >> You should also see them here:
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-iio#n91
> >>  
> 
> >>
> >>
> >> What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_raw
> >> KernelVersion: 2.6.35
> >> Contact: linux-...@vger.kernel.org
> >> Description:
> >> Raw (unscaled) differential voltage measurement equivalent to
> >> channel Y - channel Z where these channel numbers apply to the
> >> physically equivalent inputs when non differential readings are
> >> separately available. In differential only parts, then all that
> >> is required is a consistent labeling.  Units after application
> >> of scale and offset are millivolts.
> >>
> > That isn't really what I was asking for Robert.
> 
> Actually it was...
> 
> Walk:
> 
>  /sys/bus/iio/devices/iio*
> 
Well, very nearly! :-)

If I 'cd /sys/bus/iio/devices/iio*' I get to '/sys/bus/iio/devices/iio:device0',
is there any way of knowing that it's 'iio:device0'?  It's still sort
of clumsy doing a Python walk to find the files.

-- 
Chris Green
ยท

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to