general question: spi framework
Hi Guys,
I have a pretty general question about the spi framework. I hope this is not off topic for this list.
So it is about uclinux kernel 2.6.28 for blackfin cpu.
1. I undestand how to define my spi data in the board file.
2. I have kernel device driver for my spi chip.
3. I have read about linux/spi/spi.h and the spi protocol driver API which is exported.spi_read(struct spi_device *spi, u8 *buf, size_t len) spi_write(struct spi_device *spi, const u8 *buf, size_t len) etc ...
I would like to use this API from another kernel module (so kernel space)
For me it is unclear however how to get pointer to spi_device from my kernel module. In general is there somewhere an example for using of the spi framework from the kernel space. I don't want to write spi device drivers. It is already written in the linux tree. I would like to use it from the kernel space.
Thank you for all pointers you provide!
Dimitar
------------------------------------------------------------------------------
A message that is not in the archive (sent off-list or not yet received): 875452.33839.qm-cP32haYabaOvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org
Hi Dimitar,
Quoted 6 lines · Dimitar Penev
I would like to use this API from another kernel module (so kernel space) For me it is unclear however how to get pointer to
spi_devicefrom my kernel module. In general is there somewhere an example for using of the spi framework from the kernel space. I don't want to write spi device drivers. It is already written in the linux tree. I would like to use it from the kernel space.
See drivers/net/enc28j60.c (Ethernet driver), and drivers/mtd/devices/m25p80.c (Flash driver).
baruch
Signature · 5 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
------------------------------------------------------------------------------