#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/kmod.h>
#include <linux/init.h>
#include <linux/spi.h>
#include <asm/uaccess.h>
Include dependency graph for spi-core.c:

Defines | |
| #define | SPI_DATE "20041011" |
| #define | SPI_VERSION "0.0.1" |
Functions | |
| DECLARE_MUTEX (adapter_lock) | |
| LIST_HEAD (adapter_list) | |
| DECLARE_MUTEX (driver_lock) | |
| LIST_HEAD (driver_list) | |
| int | spiproc_init (void) |
| initialize spi sybsystems entries in proc filesystem | |
| int | spiproc_cleanup (void) |
| ssize_t | spiproc_bus_read (struct file *file, char *buf, size_t count, loff_t *ppos) |
| int | read_bus_spi (char *buf, char **start, off_t offset, int len, int *eof, void *private) |
| int | spi_add_adapter (struct spi_adapter *adap) |
| Make the adapter available for use by clients using name adap->name. The adap->adapters list is initialised by this function. | |
| int | spi_del_adapter (struct spi_adapter *adap) |
| Remove an adapter from the list of available SPI Bus adapters. | |
| spi_adapter * | __spi_get_adapter (const char *name) |
| spi_adapter * | spi_get_adapter (const char *name) |
| Obtain a spi_adapter structure for the specified adapter. If the adapter is not currently load, then load it. The adapter will be locked in core until all references are released via spi_put_adapter. | |
| void | spi_put_adapter (struct spi_adapter *adap) |
| int | spi_add_driver (struct spi_driver *driver) |
| int | spi_del_driver (struct spi_driver *driver) |
| spi_driver * | __spi_get_driver (const char *name) |
| spi_driver * | spi_get_driver (const char *name) |
| void | spi_put_driver (struct spi_driver *drv) |
| int | spi_attach_client (struct spi_client *client, const char *adap, const char *drv) |
| int | spi_detach_client (struct spi_client *client) |
| int | spi_transfer (struct spi_adapter *adap, struct spi_msg msgs[], int num) |
| int | spi_write (struct spi_client *client, int addr, const char *buf, int len) |
| int | spi_read (struct spi_client *client, int addr, char *buf, int len) |
| int | spi_adapter_id (struct spi_adapter *adap) |
| int __init | spi_init (void) |
| EXPORT_SYMBOL (spi_add_adapter) | |
| EXPORT_SYMBOL (spi_del_adapter) | |
| EXPORT_SYMBOL (spi_get_adapter) | |
| EXPORT_SYMBOL (spi_put_adapter) | |
| EXPORT_SYMBOL (spi_add_driver) | |
| EXPORT_SYMBOL (spi_del_driver) | |
| EXPORT_SYMBOL (spi_get_driver) | |
| EXPORT_SYMBOL (spi_put_driver) | |
| EXPORT_SYMBOL (spi_attach_client) | |
| EXPORT_SYMBOL (spi_detach_client) | |
| EXPORT_SYMBOL (spi_transfer) | |
| EXPORT_SYMBOL (spi_write) | |
| EXPORT_SYMBOL (spi_read) | |
| EXPORT_SYMBOL (spi_adapter_id) | |
Variables | |
| file_operations | spiproc_operations |
| int | spiproc_initialized = 0 |
| int | adap_id = 0 |
|
||||||||||||||||||||||||||||
|
read_bus_spi - generates the output for /proc/bus/spi
Returns the number of bytes transferred, or negative error code. |
|
|
spi_adapter_id This call returns a unique low identifier for each registered adapter
|
|
|
Make the adapter available for use by clients using name adap->name. The adap->adapters list is initialised by this function. spi_add_adapter - register a new SPI bus adapter
|
|
|
spi_add_driver - register a new SPI device driver
Returns 0; |
|
||||||||||||||||
|
spi_attach_client - attach a client to an adapter and driver
Returns 0 on success, or negative error code. |
Here is the call graph for this function:

|
|
Remove an adapter from the list of available SPI Bus adapters. spi_del_adapter - unregister a SPI bus adapter
|
|
|
spi_del_driver - unregister a SPI device driver
Returns 0; |
|
|
spi_detach_client - detach a client from an adapter and driver
|
Here is the call graph for this function:

|
|
Obtain a spi_adapter structure for the specified adapter. If the adapter is not currently load, then load it. The adapter will be locked in core until all references are released via spi_put_adapter. spi_get_adapter - get a reference to an adapter
|
|
|
spi_get_driver - get a reference to a driver
|
|
|
spi_put_adapter - release a reference to an adapter
You must not use the reference after calling this function. |
|
|
spi_put_driver - release a reference to a driver
You must not use the reference after calling this function. |
|
||||||||||||||||||||
|
spi_read - receive data from a device on an SPI bus
Returns the number of bytes transferred, or negative error code. |
Here is the call graph for this function:

|
||||||||||||||||
|
spi_transfer - transfer information on an SPI bus
Returns number of messages successfully transferred, otherwise negative error code. |
|
||||||||||||||||||||
|
spi_write - send data to a device on an SPI bus
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
spiproc_bus_read - generates the output for /proc/bus/spi-?
|
|
|
initialize spi sybsystems entries in proc filesystem spiproc_init |
Here is the call graph for this function:

|
|
Initial value: {
read: spiproc_bus_read,
}
|
1.3.6