Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
leds-pca9532.c File Reference
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/leds.h>
#include <linux/input.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/leds-pca9532.h>
#include <linux/gpio.h>

Go to the source code of this file.

Data Structures

struct  pca9532_chip_info
 
struct  pca9532_data
 

Macros

#define PCA9532_REG_INPUT(i)   ((i) >> 3)
 
#define PCA9532_REG_OFFSET(m)   ((m) >> 4)
 
#define PCA9532_REG_PSC(m, i)   (PCA9532_REG_OFFSET(m) + 0x1 + (i) * 2)
 
#define PCA9532_REG_PWM(m, i)   (PCA9532_REG_OFFSET(m) + 0x2 + (i) * 2)
 
#define LED_REG(m, led)   (PCA9532_REG_OFFSET(m) + 0x5 + (led >> 2))
 
#define LED_NUM(led)   (led & 0x3)
 
#define ldev_to_led(c)   container_of(c, struct pca9532_led, ldev)
 

Enumerations

enum  { pca9530, pca9531, pca9532, pca9533 }
 

Functions

 MODULE_DEVICE_TABLE (i2c, pca9532_id)
 
 module_i2c_driver (pca9532_driver)
 
 MODULE_AUTHOR ("Riku Voipio")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("PCA 9532 LED dimmer")
 

Macro Definition Documentation

#define ldev_to_led (   c)    container_of(c, struct pca9532_led, ldev)

Definition at line 33 of file leds-pca9532.c.

#define LED_NUM (   led)    (led & 0x3)

Definition at line 31 of file leds-pca9532.c.

#define LED_REG (   m,
  led 
)    (PCA9532_REG_OFFSET(m) + 0x5 + (led >> 2))

Definition at line 30 of file leds-pca9532.c.

#define PCA9532_REG_INPUT (   i)    ((i) >> 3)

Definition at line 26 of file leds-pca9532.c.

#define PCA9532_REG_OFFSET (   m)    ((m) >> 4)

Definition at line 27 of file leds-pca9532.c.

#define PCA9532_REG_PSC (   m,
  i 
)    (PCA9532_REG_OFFSET(m) + 0x1 + (i) * 2)

Definition at line 28 of file leds-pca9532.c.

#define PCA9532_REG_PWM (   m,
  i 
)    (PCA9532_REG_OFFSET(m) + 0x2 + (i) * 2)

Definition at line 29 of file leds-pca9532.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
pca9530 
pca9531 
pca9532 
pca9533 

Definition at line 57 of file leds-pca9532.c.

Function Documentation

MODULE_AUTHOR ( "Riku Voipio"  )
MODULE_DESCRIPTION ( "PCA 9532 LED dimmer"  )
MODULE_DEVICE_TABLE ( i2c  ,
pca9532_id   
)
module_i2c_driver ( pca9532_driver  )
MODULE_LICENSE ( "GPL"  )