1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 #ifndef __PASIC3_H
  13 #define __PASIC3_H
  14 
  15 #include <linux/platform_device.h>
  16 #include <linux/leds.h>
  17 
  18 extern void pasic3_write_register(struct device *dev, u32 reg, u8 val);
  19 extern u8 pasic3_read_register(struct device *dev, u32 reg);
  20 
  21 
  22 
  23 
  24 #define PASIC3_MASK_LED0 0x04
  25 #define PASIC3_MASK_LED1 0x08
  26 #define PASIC3_MASK_LED2 0x40
  27 
  28 
  29 
  30 
  31 #define PASIC3_BIT2_LED0 0x08
  32 #define PASIC3_BIT2_LED1 0x10
  33 #define PASIC3_BIT2_LED2 0x20
  34 
  35 struct pasic3_led {
  36         struct led_classdev         led;
  37         unsigned int                hw_num;
  38         unsigned int                bit2;
  39         unsigned int                mask;
  40         struct pasic3_leds_machinfo *pdata;
  41 };
  42 
  43 struct pasic3_leds_machinfo {
  44         unsigned int      num_leds;
  45         unsigned int      power_gpio;
  46         struct pasic3_led *leds;
  47 };
  48 
  49 struct pasic3_platform_data {
  50         struct pasic3_leds_machinfo *led_pdata;
  51         unsigned int                 clock_rate;
  52 };
  53 
  54 #endif