diff options
Diffstat (limited to 'include/linux/mfd/mc13xxx.h')
| -rw-r--r-- | include/linux/mfd/mc13xxx.h | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index 67c17b5a6f44..ac39d910e70b 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
| @@ -21,8 +21,6 @@ int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val); | |||
| 21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, | 21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, |
| 22 | u32 mask, u32 val); | 22 | u32 mask, u32 val); |
| 23 | 23 | ||
| 24 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | ||
| 25 | |||
| 26 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, | 24 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, |
| 27 | irq_handler_t handler, const char *name, void *dev); | 25 | irq_handler_t handler, const char *name, void *dev); |
| 28 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | 26 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, |
| @@ -112,9 +110,6 @@ struct mc13xxx_led_platform_data { | |||
| 112 | int id; | 110 | int id; |
| 113 | const char *name; | 111 | const char *name; |
| 114 | const char *default_trigger; | 112 | const char *default_trigger; |
| 115 | |||
| 116 | /* Three or two bits current selection depending on the led */ | ||
| 117 | char max_current; | ||
| 118 | }; | 113 | }; |
| 119 | 114 | ||
| 120 | #define MAX_LED_CONTROL_REGS 6 | 115 | #define MAX_LED_CONTROL_REGS 6 |
| @@ -123,7 +118,7 @@ struct mc13xxx_leds_platform_data { | |||
| 123 | struct mc13xxx_led_platform_data *led; | 118 | struct mc13xxx_led_platform_data *led; |
| 124 | int num_leds; | 119 | int num_leds; |
| 125 | 120 | ||
| 126 | /* LED Control 0 */ | 121 | /* MC13783 LED Control 0 */ |
| 127 | #define MC13783_LED_C0_ENABLE (1 << 0) | 122 | #define MC13783_LED_C0_ENABLE (1 << 0) |
| 128 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) | 123 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) |
| 129 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) | 124 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) |
| @@ -131,21 +126,43 @@ struct mc13xxx_leds_platform_data { | |||
| 131 | #define MC13783_LED_C0_BOOST (1 << 10) | 126 | #define MC13783_LED_C0_BOOST (1 << 10) |
| 132 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) | 127 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) |
| 133 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) | 128 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) |
| 134 | /* LED Control 1 */ | 129 | /* MC13783 LED Control 1 */ |
| 135 | #define MC13783_LED_C1_TC1HALF (1 << 18) | 130 | #define MC13783_LED_C1_TC1HALF (1 << 18) |
| 136 | #define MC13783_LED_C1_SLEWLIM (1 << 23) | 131 | #define MC13783_LED_C1_SLEWLIM (1 << 23) |
| 137 | /* LED Control 2 */ | 132 | /* MC13783 LED Control 2 */ |
| 133 | #define MC13783_LED_C2_CURRENT_MD(x) (((x) & 0x7) << 0) | ||
| 134 | #define MC13783_LED_C2_CURRENT_AD(x) (((x) & 0x7) << 3) | ||
| 135 | #define MC13783_LED_C2_CURRENT_KP(x) (((x) & 0x7) << 6) | ||
| 138 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) | 136 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) |
| 139 | #define MC13783_LED_C2_SLEWLIM (1 << 23) | 137 | #define MC13783_LED_C2_SLEWLIM (1 << 23) |
| 140 | /* LED Control 3 */ | 138 | /* MC13783 LED Control 3 */ |
| 139 | #define MC13783_LED_C3_CURRENT_R1(x) (((x) & 0x3) << 0) | ||
| 140 | #define MC13783_LED_C3_CURRENT_G1(x) (((x) & 0x3) << 2) | ||
| 141 | #define MC13783_LED_C3_CURRENT_B1(x) (((x) & 0x3) << 4) | ||
| 141 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) | 142 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) |
| 142 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) | 143 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) |
| 143 | /* LED Control 4 */ | 144 | /* MC13783 LED Control 4 */ |
| 145 | #define MC13783_LED_C4_CURRENT_R2(x) (((x) & 0x3) << 0) | ||
| 146 | #define MC13783_LED_C4_CURRENT_G2(x) (((x) & 0x3) << 2) | ||
| 147 | #define MC13783_LED_C4_CURRENT_B2(x) (((x) & 0x3) << 4) | ||
| 144 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) | 148 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) |
| 145 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) | 149 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) |
| 146 | /* LED Control 5 */ | 150 | /* MC13783 LED Control 5 */ |
| 151 | #define MC13783_LED_C5_CURRENT_R3(x) (((x) & 0x3) << 0) | ||
| 152 | #define MC13783_LED_C5_CURRENT_G3(x) (((x) & 0x3) << 2) | ||
| 153 | #define MC13783_LED_C5_CURRENT_B3(x) (((x) & 0x3) << 4) | ||
| 147 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) | 154 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) |
| 148 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) | 155 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) |
| 156 | /* MC13892 LED Control 0 */ | ||
| 157 | #define MC13892_LED_C0_CURRENT_MD(x) (((x) & 0x7) << 9) | ||
| 158 | #define MC13892_LED_C0_CURRENT_AD(x) (((x) & 0x7) << 21) | ||
| 159 | /* MC13892 LED Control 1 */ | ||
| 160 | #define MC13892_LED_C1_CURRENT_KP(x) (((x) & 0x7) << 9) | ||
| 161 | /* MC13892 LED Control 2 */ | ||
| 162 | #define MC13892_LED_C2_CURRENT_R(x) (((x) & 0x7) << 9) | ||
| 163 | #define MC13892_LED_C2_CURRENT_G(x) (((x) & 0x7) << 21) | ||
| 164 | /* MC13892 LED Control 3 */ | ||
| 165 | #define MC13892_LED_C3_CURRENT_B(x) (((x) & 0x7) << 9) | ||
| 149 | u32 led_control[MAX_LED_CONTROL_REGS]; | 166 | u32 led_control[MAX_LED_CONTROL_REGS]; |
| 150 | }; | 167 | }; |
| 151 | 168 | ||
