0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __LINUX_PCA9532_H
0011 #define __LINUX_PCA9532_H
0012
0013 #include <linux/leds.h>
0014 #include <linux/workqueue.h>
0015 #include <dt-bindings/leds/leds-pca9532.h>
0016
0017 enum pca9532_state {
0018 PCA9532_OFF = 0x0,
0019 PCA9532_ON = 0x1,
0020 PCA9532_PWM0 = 0x2,
0021 PCA9532_PWM1 = 0x3,
0022 PCA9532_KEEP = 0xff,
0023 };
0024
0025 struct pca9532_led {
0026 u8 id;
0027 struct i2c_client *client;
0028 const char *name;
0029 const char *default_trigger;
0030 struct led_classdev ldev;
0031 struct work_struct work;
0032 u32 type;
0033 enum pca9532_state state;
0034 };
0035
0036 struct pca9532_platform_data {
0037 struct pca9532_led leds[16];
0038 u8 pwm[2];
0039 u8 psc[2];
0040 int gpio_base;
0041 };
0042
0043 #endif