spi - Beaglebone Linux: issues appending a line to a file -


i working enable spi on beaglebone black (angstrom distribution), using instructions here.

i @ point need add bb-spi1-01 /sys/devices/bone_capemgr.*/slots enable drivers.

issuing command echo bb-spi1-01 > /sys/devices/bone_capemgr.*/slots or echo bb-spi1-01 >> /sys/devices/bone_capemgr.*/slots, however, yields error echo: write error: file exists

trying edit in line nano fails. i'm able open file , edit it, when save gives me error writing slots: no such file or directory

i've set permissions on file 777.

does know why cannot edit file? if it's not possible, there workaround?

i, have battled dilemma while trying port ili9340c display stuff beaglebone black. way /dev/devices/bone_capemgr.* works echo slots directory goes , searches device tree overlay device, new thing in linux kernel 3.0 , higher. not know (it took me forever find this) device trees driver tells linux how deal device, instead of containing code, configuration file, per-se, tells linux put in order talk device, , expect in return. being said, bb-spix-01 compiled device tree file, .dts in /lib/firmware/ points spi device, , tells spidev it.

bb-spi1-01 happens connected hdmi port audio thing (i think) and, therefore, unless disable hdmi entirely, spi1 tied hdmi framer. explains why writing bb-spi1-01 /sys/devices/bone_capemgr.*/slots fails. special file, , when write it, kernel process reads input , proceeds attempt make 'device' file elsewhere, , since bb-spi1-01 enabled, file exists, , kernel process handles things returns error , pipes through whatever process initiated it, in case, you, user, typing echo bb-spi1-01 > /sys/devices/bone_capemgr.*/slots.

on bright side, spi0 left unused. therefore, in order use it, have enable in userland. that, (and have figured out already, else) type echo bb-spi0-01 > /sys/devices/bone_capemgr.*/slots @ command line, , sure spidev running, type modprobe spidev root. now, verify, type ls /dev | grep spi , see comes up. /dev/spidevx.y spi bus, me /dev/spidev1.0.

i'm sorry long winded, i'm culminating research far 1 spot in hopes someone.

if have questions, please feel free ask!


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -