Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
maple.h File Reference
#include <mach/maple.h>

Go to the source code of this file.

Data Structures

struct  maple_buffer
 
struct  mapleq
 
struct  maple_devinfo
 
struct  maple_device
 
struct  maple_driver
 

Macros

#define to_maple_dev(n)   container_of(n, struct maple_device, dev)
 
#define to_maple_driver(n)   container_of(n, struct maple_driver, drv)
 
#define maple_get_drvdata(d)   dev_get_drvdata(&(d)->dev)
 
#define maple_set_drvdata(d, p)   dev_set_drvdata(&(d)->dev, (p))
 

Enumerations

enum  maple_code {
  MAPLE_RESPONSE_FILEERR = -5, MAPLE_RESPONSE_AGAIN, MAPLE_RESPONSE_BADCMD, MAPLE_RESPONSE_BADFUNC,
  MAPLE_RESPONSE_NONE, MAPLE_COMMAND_DEVINFO = 1, MAPLE_COMMAND_ALLINFO, MAPLE_COMMAND_RESET,
  MAPLE_COMMAND_KILL, MAPLE_RESPONSE_DEVINFO, MAPLE_RESPONSE_ALLINFO, MAPLE_RESPONSE_OK,
  MAPLE_RESPONSE_DATATRF, MAPLE_COMMAND_GETCOND, MAPLE_COMMAND_GETMINFO, MAPLE_COMMAND_BREAD,
  MAPLE_COMMAND_BWRITE, MAPLE_COMMAND_BSYNC, MAPLE_COMMAND_SETCOND, MAPLE_COMMAND_MICCONTROL
}
 
enum  maple_file_errors {
  MAPLE_FILEERR_INVALID_PARTITION = 0x01000000, MAPLE_FILEERR_PHASE_ERROR = 0x02000000, MAPLE_FILEERR_INVALID_BLOCK = 0x04000000, MAPLE_FILEERR_WRITE_ERROR = 0x08000000,
  MAPLE_FILEERR_INVALID_WRITE_LENGTH = 0x10000000, MAPLE_FILEERR_BAD_CRC = 0x20000000
}
 

Functions

void maple_getcond_callback (struct maple_device *dev, void(*callback)(struct mapleq *mq), unsigned long interval, unsigned long function)
 
int maple_driver_register (struct maple_driver *)
 
void maple_driver_unregister (struct maple_driver *)
 
int maple_add_packet (struct maple_device *mdev, u32 function, u32 command, u32 length, void *data)
 
void maple_clear_dev (struct maple_device *mdev)
 

Variables

struct bus_type maple_bus_type
 

Macro Definition Documentation

#define maple_get_drvdata (   d)    dev_get_drvdata(&(d)->dev)

Definition at line 102 of file maple.h.

#define maple_set_drvdata (   d,
  p 
)    dev_set_drvdata(&(d)->dev, (p))

Definition at line 103 of file maple.h.

#define to_maple_dev (   n)    container_of(n, struct maple_device, dev)

Definition at line 99 of file maple.h.

#define to_maple_driver (   n)    container_of(n, struct maple_driver, drv)

Definition at line 100 of file maple.h.

Enumeration Type Documentation

enum maple_code
Enumerator:
MAPLE_RESPONSE_FILEERR 
MAPLE_RESPONSE_AGAIN 
MAPLE_RESPONSE_BADCMD 
MAPLE_RESPONSE_BADFUNC 
MAPLE_RESPONSE_NONE 
MAPLE_COMMAND_DEVINFO 
MAPLE_COMMAND_ALLINFO 
MAPLE_COMMAND_RESET 
MAPLE_COMMAND_KILL 
MAPLE_RESPONSE_DEVINFO 
MAPLE_RESPONSE_ALLINFO 
MAPLE_RESPONSE_OK 
MAPLE_RESPONSE_DATATRF 
MAPLE_COMMAND_GETCOND 
MAPLE_COMMAND_GETMINFO 
MAPLE_COMMAND_BREAD 
MAPLE_COMMAND_BWRITE 
MAPLE_COMMAND_BSYNC 
MAPLE_COMMAND_SETCOND 
MAPLE_COMMAND_MICCONTROL 

Definition at line 10 of file maple.h.

Enumerator:
MAPLE_FILEERR_INVALID_PARTITION 
MAPLE_FILEERR_PHASE_ERROR 
MAPLE_FILEERR_INVALID_BLOCK 
MAPLE_FILEERR_WRITE_ERROR 
MAPLE_FILEERR_INVALID_WRITE_LENGTH 
MAPLE_FILEERR_BAD_CRC 

Definition at line 33 of file maple.h.

Function Documentation

int maple_add_packet ( struct maple_device mdev,
u32  function,
u32  command,
u32  length,
void data 
)
void maple_clear_dev ( struct maple_device mdev)
int maple_driver_register ( struct maple_driver drv)

maple_driver_register - register a maple driver : maple driver to be registered.

Registers the passed in , while updating the bus type. Devices with matching function IDs will be automatically probed.

Definition at line 71 of file maple.c.

void maple_driver_unregister ( struct maple_driver drv)

maple_driver_unregister - unregister a maple driver. : maple driver to unregister.

Cleans up after maple_driver_register(). To be invoked in the exit path of any module drivers.

Definition at line 89 of file maple.c.

void maple_getcond_callback ( struct maple_device dev,
void(*)(struct mapleq *mq)  callback,
unsigned long  interval,
unsigned long  function 
)

maple_getcond_callback - setup handling MAPLE_COMMAND_GETCOND : device responding : handler callback : interval in jiffies between callbacks : the function code for the device

Definition at line 121 of file maple.c.

Variable Documentation

struct bus_type maple_bus_type

Definition at line 783 of file maple.c.