flinkLinux
flink Linux Kernel Modules
 All Data Structures Files Functions Variables Macros Pages
flink_spi.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/compat.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
#include "flink.h"
Include dependency graph for flink_spi.c:

Data Structures

struct  spi_data
 SPI bus data. More...
 

Macros

#define BUFSIZE   32
 
#define MODULE_NAME   THIS_MODULE->name
 

Functions

 module_param (dev_mem_length, uint, 0444)
 
 MODULE_PARM_DESC (dev_mem_length,"device memory length")
 
 MODULE_AUTHOR ("Urs Graf")
 
 MODULE_DESCRIPTION ("fLink SPI module for mpc5200")
 
 MODULE_SUPPORTED_DEVICE ("fLink SPI devices")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 MODULE_ALIAS ("spi:flink_spi")
 
u8 spi_read8 (struct flink_device *fdev, u32 addr)
 
u16 spi_read16 (struct flink_device *fdev, u32 addr)
 
u32 spi_read32 (struct flink_device *fdev, u32 addr)
 
int spi_write8 (struct flink_device *fdev, u32 addr, u8 val)
 
int spi_write16 (struct flink_device *fdev, u32 addr, u16 val)
 
int spi_write32 (struct flink_device *fdev, u32 addr, u32 val)
 
u32 spi_address_space_size (struct flink_device *fdev)
 
 module_init (mod_init)
 
 module_exit (mod_exit)
 

Variables

struct spi_transfer t1 = {.len = 4,}
 
struct spi_transfer t2 = {.len = 4,}
 
struct spi_transfer r1 = {.len = 4,}
 
struct spi_message m1 m2
 
struct flink_bus_ops spi_bus_ops
 

Macro Definition Documentation

#define BUFSIZE   32
#define MODULE_NAME   THIS_MODULE->name

Function Documentation

MODULE_ALIAS ( "spi:flink_spi"  )
MODULE_AUTHOR ( "Urs Graf"  )
MODULE_DESCRIPTION ( "fLink SPI module for mpc5200"  )
module_exit ( mod_exit  )
module_init ( mod_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param ( dev_mem_length  ,
uint  ,
0444   
)
MODULE_PARM_DESC ( dev_mem_length  ,
"device memory length"   
)
MODULE_SUPPORTED_DEVICE ( "fLink SPI devices"  )
u32 spi_address_space_size ( struct flink_device fdev)
u16 spi_read16 ( struct flink_device fdev,
u32  addr 
)
u32 spi_read32 ( struct flink_device fdev,
u32  addr 
)
u8 spi_read8 ( struct flink_device fdev,
u32  addr 
)
int spi_write16 ( struct flink_device fdev,
u32  addr,
u16  val 
)
int spi_write32 ( struct flink_device fdev,
u32  addr,
u32  val 
)
int spi_write8 ( struct flink_device fdev,
u32  addr,
u8  val 
)

Variable Documentation

struct spi_message m1 m2
struct spi_transfer r1 = {.len = 4,}
struct flink_bus_ops spi_bus_ops
Initial value:
= {
.read8 = spi_read8,
.read16 = spi_read16,
.read32 = spi_read32,
.write8 = spi_write8,
.write16 = spi_write16,
.write32 = spi_write32,
.address_space_size = spi_address_space_size
}
struct spi_transfer t1 = {.len = 4,}
struct spi_transfer t2 = {.len = 4,}