Why ADC helper driver does not work?

33 views
Skip to first unread message

andk...@gmail.com

unread,
Feb 15, 2017, 8:20:46 AM2/15/17
to BeagleBoard
In my project I use ADC. But I try to avoid dynamic overlay loading in order to increase boot speed. 
So I move code from ADC overlay (BB-ADC-00A0.dts) to main device tree source (am335x-boneblack.dts):

 / {
       
...

        ocp
{
                       
               
/* ADC filesystem helper
                */

                test_helper
: helper {
                        compatible
= "bone-iio-helper";
                        vsense
-name  = "AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7";
                        vsense
-scale = <100     100     100     100     100     100     100     100>;
                        status
= "okay";
               
};      
       
};
};

/* Enable ADC */
&tscadc {
        status
= "okay";

        adc
{
                ti
,adc-channels = <0 1 2 3 4 5 6 7>;
       
};
};


After boot I found out that directory /sys/devices/ocp.*/helper.*/ does not contain AIN files. dmesg out dos not contain messages from
bone-iio-helper driver. Somehow bone-iio-helper driver haven't been loaded while device tree processing.

Is there a way to fix this issue?

Chad Baker

unread,
Feb 15, 2017, 9:22:17 AM2/15/17
to beagl...@googlegroups.com
Which OS?
Run
uname -a
cat /etc/dogtag
cat /etc/debian_version ###if debian

If the device tree was loaded and you have a late version of debian,
probably you need to look in /sys/devices/platform/ocp/ for the
directory 44e0d000.tscadc
There you will find the directories TI-am335x-adc/iio\:device0
Inside, you will find in_voltage[06].raw
These correspond to the AIN[0-6] for earlier OSes.


If the device tree was not loaded check dmesg.

Chad


On 2/15/17 4:42 AM, andk...@gmail.com wrote:
> For more opt

Reply all
Reply to author
Forward
0 new messages