Hello, I am trying to learn driver development and am trying to load the adxl34x driver as a module to a beaglebone black. So far I have done the following:
1) been through the adxl34x driver code in the buildroot kernel directory to get some very small understanding of some of the things that are happening.
2) in buildroot, add the adxl34x & adxl34x-i2c components as modules, and deploy the new buildroot build to the beaglebone
3) connect adxl345 chip and confirm it is working by i2cdetect on i2c-2 (it is shown as address 0x53)
4) been through the
https://wiki.analog.com/resources/to...t-misc/adxl345 page and tried to follow the instructions to load the module:
Code:
modprobe evdev
modprobe adxl34x
have also tried (which is not mentioned in the wiki):
Code:
echo adxl34x 0x53 > /sys/bus/i2c/devices/i2c-2/new_device
After trying all of this and playing around for a few days, there is nothing I can find to be able to read from the device:
Nothing in /sys/class/input/
Nothing in /sys/class/devices/platform/
Nothing in /dev/input/
After modprobe adxl34x, /sys/module/adxl34x is created however.
I have also done various 'find's on the entire system to look for clues...
5) the wiki mentions that a device tree entry is required for the adxl34x. I have converted the .dtb's in the buildroot /output/images/ directory back to .dts's to check, and they do not have entries for "adxl34x". If this is required, shouldn't buildroot be doing this automatically?
So... please can someone tell me what simple steps i am missing, what I am misunderstanding, or what manuals I need to read?
Do I need to edit the .dts to include an entry for adxl34x?
Any help will be very much appreciated!
Thanks