[Solved] Device tree magic needed for ADC on newer kernel

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

[Solved] Device tree magic needed for ADC on newer kernel

Postby matthewmcneely » Sat Mar 21, 2015 8:22 pm

[Update] With help I solved this problem and described what I did here:

https://gist.github.com/matthewmcneely/bf44655c74096ff96475#file-enabling-adc-on-bbb-md


Hi Forum,

I'm trying to read ADC output from the BBB AIN pins under a 3.19 kernel. It seems that the GPIO pins are available via /sys/class/gpio (as was the case in earlier kernels). However, the ADC interface that previously was available via /sys/bus/iio/devices is no longer available.

I tried adding the module to the kernel via

$this->bbcode_second_pass_code('', 'modprobe ti_am335x_adc')

and the /sys/bus/iio/devices is indeed created, but the file iio:device0 (that in prior kernel versions was added with an overlay) is still missing.

Is there a special dtb file that must be loaded at boot time to enable ADC access?

Thanks!

Here's my uname -a and my lsmod output in case it helps.
$this->bbcode_second_pass_code('', '
[root@nodeproto ~]# uname -a
Linux nodeproto 3.19.0-1-ARCH #1 Sun Feb 15 21:21:07 MST 2015 armv7l GNU/Linux
')

$this->bbcode_second_pass_code('', '
[root@nodeproto ~]# lsmod
Module Size Used by
ti_am335x_adc 4654 0
kfifo_buf 2430 1 ti_am335x_adc
industrialio 38455 2 ti_am335x_adc,kfifo_buf
arc4 1759 2
rt2800usb 15991 0
omap_aes 13035 0
omap_sham 19042 0
rt2800lib 58952 1 rt2800usb
rt2x00usb 9228 1 rt2800usb
rt2x00lib 36315 3 rt2x00usb,rt2800lib,rt2800usb
ecb 1886 1
mac80211 438136 3 rt2x00lib,rt2x00usb,rt2800lib
btusb 22375 0
snd_usb_audio 129778 0
cfg80211 370730 2 mac80211,rt2x00lib
snd_hwdep 5362 1 snd_usb_audio
snd_usbmidi_lib 18169 1 snd_usb_audio
joydev 7339 0
snd_rawmidi 17370 1 snd_usbmidi_lib
evdev 7837 0
bluetooth 372172 2 btusb
snd_seq_device 6585 1 snd_rawmidi
snd_pcm 70742 1 snd_usb_audio
uvcvideo 63732 0
snd_timer 15527 1 snd_pcm
videobuf2_vmalloc 4877 1 uvcvideo
snd 51284 7 snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
videobuf2_memops 2321 1 videobuf2_vmalloc
crc_ccitt 1460 1 rt2800lib
soundcore 6163 1 snd
videobuf2_core 33484 1 uvcvideo
sch_fq_codel 6095 2
')
matthewmcneely
 
Posts: 1
Joined: Sat Mar 21, 2015 5:22 pm

Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 5 guests

cron