0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __PASIC3_H
0013 #define __PASIC3_H
0014
0015 #include <linux/platform_device.h>
0016 #include <linux/leds.h>
0017
0018 extern void pasic3_write_register(struct device *dev, u32 reg, u8 val);
0019 extern u8 pasic3_read_register(struct device *dev, u32 reg);
0020
0021
0022
0023
0024 #define PASIC3_MASK_LED0 0x04
0025 #define PASIC3_MASK_LED1 0x08
0026 #define PASIC3_MASK_LED2 0x40
0027
0028
0029
0030
0031 #define PASIC3_BIT2_LED0 0x08
0032 #define PASIC3_BIT2_LED1 0x10
0033 #define PASIC3_BIT2_LED2 0x20
0034
0035 struct pasic3_led {
0036 struct led_classdev led;
0037 unsigned int hw_num;
0038 unsigned int bit2;
0039 unsigned int mask;
0040 struct pasic3_leds_machinfo *pdata;
0041 };
0042
0043 struct pasic3_leds_machinfo {
0044 unsigned int num_leds;
0045 unsigned int power_gpio;
0046 struct pasic3_led *leds;
0047 };
0048
0049 struct pasic3_platform_data {
0050 struct pasic3_leds_machinfo *led_pdata;
0051 unsigned int clock_rate;
0052 };
0053
0054 #endif