hello
------test source-----------
device="/dev/spi_misc_test";
fd = open(device, O_RDWR);
if (fd < 0)
pabort("can't open device");
/*
* spi mode
*/
ret = ioctl(fd, SPI_IOC_WR_MODE, &mode);
if (ret == -1)
pabort("can't set spi mode");
-----------------------------------
however error abort.
How do I use SPI?
hi schkiki
you can find that spi_misc_test don't have an open function in source file kernel/drivers/spi/spi-rockchip-test.c
static const struct file_operations spi_test_fops = {
.write = spi_test_write,
};
so, it will be an error abort when you open the spi_misc_test.
before you want to open it or read it, you should write an open function, read function by yourself.
by the way, the SPI in firefly-rk3288 using the linux common interface, you can get more samples by google.
Hello,
I have firefly rk 3288 board.
As I found on the tutorial on the website [wiki gpio ] I tried to use SPI /GPIO but could not found dts file or even kernel/drivers or kernel/.../boot/dts/..etc
I also tried with find and locate command. it does not return any file with *.dts
Are these all about kernel compilation from source ? what are the actual steps I need to perform and what are those ?
Could you please write some more details about how use GPIO/SPI ..
thanks
As I found on the tutorial on the website [wiki gpio ] I tried to use SPI /GPIO but could not found dts file or even kernel/drivers or kernel/.../boot/dts/.. etc
I also tried with find and locate command. it does not return any file with *.dts
dts is in kernel source tree.
HI
THANKS.
COULD YOU PLEASE MENTIONED MORE ABOUT HOW I CAN USE GPIO/SPI . IT WILL BE PERFECT IF YOU JUST SEND ME ABOUT THE STEPS WHAT I HAVE TO
DO ...
THANKS IN ADVANCE
Hi,
I as look on that, if I am not work , I have to download kernel source tree from here - https://bitbucket.org/T-Firefly/firefly-rk3288-kernel, after configuraing dts for gpio/spi I have to build it and install kernels and modules, Is that right?
dear all,
I am little bit confused about the firefly. I modified the dts file inside the kernel source /arch/arm/boot/dts firefly-rk3288.dts.
My confusion is when kernel compiled will it take firefly-rk3288.dts or firefly-rk3288_beta.dts . Both have the same node i guess.
thanks
hi LNX_HOBBY
it will take firefly-rk3288.dts when you compile kernel, if your board is hardware version 2014.09.30.
Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) | Powered by Discuz! X3.1 |