Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
appletouch.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/usb/input.h>

Go to the source code of this file.

Data Structures

struct  atp_info
 
struct  atp
 

Macros

#define ATP_DEVICE(prod, info)
 
#define ATP_XSENSORS   26
 
#define ATP_YSENSORS   16
 
#define ATP_FUZZ   16
 
#define ATP_PRESSURE   300
 
#define ATP_THRESHOLD   5
 
#define ATP_GEYSER_MODE_READ_REQUEST_ID   1
 
#define ATP_GEYSER_MODE_WRITE_REQUEST_ID   9
 
#define ATP_GEYSER_MODE_REQUEST_VALUE   0x300
 
#define ATP_GEYSER_MODE_REQUEST_INDEX   0
 
#define ATP_GEYSER_MODE_VENDOR_VALUE   0x04
 
#define dbg_dump(msg, tab)
 
#define dprintk(format, a...)
 
#define ATP_URB_STATUS_SUCCESS   0
 
#define ATP_URB_STATUS_ERROR   1
 
#define ATP_URB_STATUS_ERROR_FATAL   2
 

Enumerations

enum  atp_status_bits { ATP_STATUS_BUTTON = BIT(0), ATP_STATUS_BASE_UPDATE = BIT(2), ATP_STATUS_FROM_RESET = BIT(4) }
 

Functions

 MODULE_DEVICE_TABLE (usb, atp_table)
 
 MODULE_AUTHOR ("Johannes Berg")
 
 MODULE_AUTHOR ("Stelian Pop")
 
 MODULE_AUTHOR ("Frank Arnold")
 
 MODULE_AUTHOR ("Michael Hanselmann")
 
 MODULE_AUTHOR ("Sven Anders")
 
 MODULE_DESCRIPTION ("Apple PowerBook and MacBook USB touchpad driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param (threshold, int, 0644)
 
 MODULE_PARM_DESC (threshold,"Discard any change in data from a sensor"" (the trackpad has many of these sensors)"" less than this value.")
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Activate debugging output")
 
 module_usb_driver (atp_driver)
 

Macro Definition Documentation

#define ATP_DEVICE (   prod,
  info 
)
Value:
{ \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
USB_DEVICE_ID_MATCH_INT_CLASS | \
USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
.idVendor = 0x05ac, /* Apple */ \
.idProduct = (prod), \
.bInterfaceClass = 0x03, \
.bInterfaceProtocol = 0x02, \
.driver_info = (unsigned long) &info, \
}

Definition at line 105 of file appletouch.c.

#define ATP_FUZZ   16

Definition at line 160 of file appletouch.c.

#define ATP_GEYSER_MODE_READ_REQUEST_ID   1

Definition at line 172 of file appletouch.c.

#define ATP_GEYSER_MODE_REQUEST_INDEX   0

Definition at line 175 of file appletouch.c.

#define ATP_GEYSER_MODE_REQUEST_VALUE   0x300

Definition at line 174 of file appletouch.c.

#define ATP_GEYSER_MODE_VENDOR_VALUE   0x04

Definition at line 176 of file appletouch.c.

#define ATP_GEYSER_MODE_WRITE_REQUEST_ID   9

Definition at line 173 of file appletouch.c.

#define ATP_PRESSURE   300

Definition at line 163 of file appletouch.c.

#define ATP_THRESHOLD   5

Definition at line 169 of file appletouch.c.

#define ATP_URB_STATUS_ERROR   1

Definition at line 399 of file appletouch.c.

#define ATP_URB_STATUS_ERROR_FATAL   2

Definition at line 400 of file appletouch.c.

#define ATP_URB_STATUS_SUCCESS   0

Definition at line 398 of file appletouch.c.

#define ATP_XSENSORS   26

Definition at line 156 of file appletouch.c.

#define ATP_YSENSORS   16

Definition at line 157 of file appletouch.c.

#define dbg_dump (   msg,
  tab 
)
Value:
if (debug > 1) { \
int __i; \
printk(KERN_DEBUG "appletouch: %s", msg); \
for (__i = 0; __i < ATP_XSENSORS + ATP_YSENSORS; __i++) \
printk(" %02x", tab[__i]); \
printk("\n"); \
}

Definition at line 216 of file appletouch.c.

#define dprintk (   format,
  a... 
)
Value:
do { \
if (debug) \
printk(KERN_DEBUG format, ##a); \
} while (0)

Definition at line 225 of file appletouch.c.

Enumeration Type Documentation

enum atp_status_bits - status bit meanings

These constants represent the meaning of the status bits. (only Geyser 3/4)

: The button was pressed : Update of the base values (untouched pad) : Reset previously performed

Enumerator:
ATP_STATUS_BUTTON 
ATP_STATUS_BASE_UPDATE 
ATP_STATUS_FROM_RESET 

Definition at line 188 of file appletouch.c.

Function Documentation

MODULE_AUTHOR ( "Johannes Berg"  )
MODULE_AUTHOR ( "Stelian Pop"  )
MODULE_AUTHOR ( "Frank Arnold"  )
MODULE_AUTHOR ( "Michael Hanselmann"  )
MODULE_AUTHOR ( "Sven Anders"  )
MODULE_DESCRIPTION ( "Apple PowerBook and MacBook USB touchpad driver )
MODULE_DEVICE_TABLE ( usb  ,
atp_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( threshold  ,
int  ,
0644   
)
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( threshold  ,
"Discard any change in data from a sensor"" (the trackpad has many of these sensors)"" less than this value."   
)
MODULE_PARM_DESC ( debug  ,
"Activate debugging output  
)
module_usb_driver ( atp_driver  )