diff options
Diffstat (limited to 'include/linux/mfd/max8997.h')
-rw-r--r-- | include/linux/mfd/max8997.h | 83 |
1 files changed, 81 insertions, 2 deletions
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h index 0bbd13dbe336..fff590521e50 100644 --- a/include/linux/mfd/max8997.h +++ b/include/linux/mfd/max8997.h | |||
@@ -77,6 +77,82 @@ struct max8997_regulator_data { | |||
77 | struct regulator_init_data *initdata; | 77 | struct regulator_init_data *initdata; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | enum max8997_muic_usb_type { | ||
81 | MAX8997_USB_HOST, | ||
82 | MAX8997_USB_DEVICE, | ||
83 | }; | ||
84 | |||
85 | enum max8997_muic_charger_type { | ||
86 | MAX8997_CHARGER_TYPE_NONE = 0, | ||
87 | MAX8997_CHARGER_TYPE_USB, | ||
88 | MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT, | ||
89 | MAX8997_CHARGER_TYPE_DEDICATED_CHG, | ||
90 | MAX8997_CHARGER_TYPE_500MA, | ||
91 | MAX8997_CHARGER_TYPE_1A, | ||
92 | MAX8997_CHARGER_TYPE_DEAD_BATTERY = 7, | ||
93 | }; | ||
94 | |||
95 | struct max8997_muic_reg_data { | ||
96 | u8 addr; | ||
97 | u8 data; | ||
98 | }; | ||
99 | |||
100 | /** | ||
101 | * struct max8997_muic_platform_data | ||
102 | * @usb_callback: callback function for USB | ||
103 | * inform callee of USB type (HOST or DEVICE) | ||
104 | * and attached state(true or false) | ||
105 | * @charger_callback: callback function for charger | ||
106 | * inform callee of charger_type | ||
107 | * and attached state(true or false) | ||
108 | * @deskdock_callback: callback function for desk dock | ||
109 | * inform callee of attached state(true or false) | ||
110 | * @cardock_callback: callback function for car dock | ||
111 | * inform callee of attached state(true or false) | ||
112 | * @mhl_callback: callback function for MHL (Mobile High-definition Link) | ||
113 | * inform callee of attached state(true or false) | ||
114 | * @uart_callback: callback function for JIG UART | ||
115 | * inform callee of attached state(true or false) | ||
116 | * @init_data: array of max8997_muic_reg_data | ||
117 | * used for initializing registers of MAX8997 MUIC device | ||
118 | * @num_init_data: array size of init_data | ||
119 | */ | ||
120 | struct max8997_muic_platform_data { | ||
121 | void (*usb_callback)(enum max8997_muic_usb_type usb_type, | ||
122 | bool attached); | ||
123 | void (*charger_callback)(bool attached, | ||
124 | enum max8997_muic_charger_type charger_type); | ||
125 | void (*deskdock_callback) (bool attached); | ||
126 | void (*cardock_callback) (bool attached); | ||
127 | void (*mhl_callback) (bool attached); | ||
128 | void (*uart_callback) (bool attached); | ||
129 | |||
130 | struct max8997_muic_reg_data *init_data; | ||
131 | int num_init_data; | ||
132 | }; | ||
133 | |||
134 | enum max8997_led_mode { | ||
135 | MAX8997_NONE, | ||
136 | MAX8997_FLASH_MODE, | ||
137 | MAX8997_MOVIE_MODE, | ||
138 | MAX8997_FLASH_PIN_CONTROL_MODE, | ||
139 | MAX8997_MOVIE_PIN_CONTROL_MODE, | ||
140 | }; | ||
141 | |||
142 | /** | ||
143 | * struct max8997_led_platform_data | ||
144 | * The number of LED devices for MAX8997 is two | ||
145 | * @mode: LED mode for each LED device | ||
146 | * @brightness: initial brightness for each LED device | ||
147 | * range: | ||
148 | * [0 - 31]: MAX8997_FLASH_MODE and MAX8997_FLASH_PIN_CONTROL_MODE | ||
149 | * [0 - 15]: MAX8997_MOVIE_MODE and MAX8997_MOVIE_PIN_CONTROL_MODE | ||
150 | */ | ||
151 | struct max8997_led_platform_data { | ||
152 | enum max8997_led_mode mode[2]; | ||
153 | u8 brightness[2]; | ||
154 | }; | ||
155 | |||
80 | struct max8997_platform_data { | 156 | struct max8997_platform_data { |
81 | /* IRQ */ | 157 | /* IRQ */ |
82 | int irq_base; | 158 | int irq_base; |
@@ -113,10 +189,13 @@ struct max8997_platform_data { | |||
113 | /* charge Full Timeout */ | 189 | /* charge Full Timeout */ |
114 | int timeout; /* 0 (no timeout), 5, 6, 7 hours */ | 190 | int timeout; /* 0 (no timeout), 5, 6, 7 hours */ |
115 | 191 | ||
116 | /* MUIC: Not implemented */ | 192 | /* ---- MUIC ---- */ |
193 | struct max8997_muic_platform_data *muic_pdata; | ||
194 | |||
117 | /* HAPTIC: Not implemented */ | 195 | /* HAPTIC: Not implemented */ |
118 | /* RTC: Not implemented */ | 196 | /* RTC: Not implemented */ |
119 | /* Flash: Not implemented */ | 197 | /* ---- LED ---- */ |
198 | struct max8997_led_platform_data *led_pdata; | ||
120 | }; | 199 | }; |
121 | 200 | ||
122 | #endif /* __LINUX_MFD_MAX8998_H */ | 201 | #endif /* __LINUX_MFD_MAX8998_H */ |