max8997.h (02b09703e7a411f80e5ec037b3abf14061a61933) | max8997.h (104594b01ce750c91a19e9f1d8fe6b24ea8f9a59) |
---|---|
1/* 2 * max8997.h - Driver for the Maxim 8997/8966 3 * 4 * Copyright (C) 2009-2010 Samsung Electrnoics 5 * MyungJoo Ham <myungjoo.ham@samsung.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 117 unchanged lines hidden (view full) --- 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 | 1/* 2 * max8997.h - Driver for the Maxim 8997/8966 3 * 4 * Copyright (C) 2009-2010 Samsung Electrnoics 5 * MyungJoo Ham <myungjoo.ham@samsung.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 117 unchanged lines hidden (view full) --- 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 |
134enum 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 */ 151struct max8997_led_platform_data { 152 enum max8997_led_mode mode[2]; 153 u8 brightness[2]; 154}; 155 | |
156enum max8997_haptic_motor_type { 157 MAX8997_HAPTIC_ERM, 158 MAX8997_HAPTIC_LRA, 159}; 160 161enum max8997_haptic_pulse_mode { 162 MAX8997_EXTERNAL_MODE, 163 MAX8997_INTERNAL_MODE, 164}; 165 166enum max8997_haptic_pwm_divisor { 167 MAX8997_PWM_DIVISOR_32, 168 MAX8997_PWM_DIVISOR_64, 169 MAX8997_PWM_DIVISOR_128, 170 MAX8997_PWM_DIVISOR_256, 171}; 172 | 134enum max8997_haptic_motor_type { 135 MAX8997_HAPTIC_ERM, 136 MAX8997_HAPTIC_LRA, 137}; 138 139enum max8997_haptic_pulse_mode { 140 MAX8997_EXTERNAL_MODE, 141 MAX8997_INTERNAL_MODE, 142}; 143 144enum max8997_haptic_pwm_divisor { 145 MAX8997_PWM_DIVISOR_32, 146 MAX8997_PWM_DIVISOR_64, 147 MAX8997_PWM_DIVISOR_128, 148 MAX8997_PWM_DIVISOR_256, 149}; 150 |
173/* | 151/** |
174 * max8997_haptic_platform_data 175 * @pwm_channel_id: channel number of PWM device 176 * valid for MAX8997_EXTERNAL_MODE 177 * @pwm_period: period in nano second for PWM device 178 * valid for MAX8997_EXTERNAL_MODE 179 * @type: motor type 180 * @mode: pulse mode 181 * MAX8997_EXTERNAL_MODE: external PWM device is used to control motor 182 * MAX8997_INTERNAL_MODE: internal pulse generator is used to control motor 183 * @pwm_divisor: divisor for external PWM device 184 * @internal_mode_pattern: internal mode pattern for internal mode 185 * [0 - 3]: valid pattern number 186 * @pattern_cycle: the number of cycles of the waveform 187 * for the internal mode pattern 188 * [0 - 15]: available cycles 189 * @pattern_signal_period: period of the waveform for the internal mode pattern 190 * [0 - 255]: available period 191 */ 192struct max8997_haptic_platform_data { | 152 * max8997_haptic_platform_data 153 * @pwm_channel_id: channel number of PWM device 154 * valid for MAX8997_EXTERNAL_MODE 155 * @pwm_period: period in nano second for PWM device 156 * valid for MAX8997_EXTERNAL_MODE 157 * @type: motor type 158 * @mode: pulse mode 159 * MAX8997_EXTERNAL_MODE: external PWM device is used to control motor 160 * MAX8997_INTERNAL_MODE: internal pulse generator is used to control motor 161 * @pwm_divisor: divisor for external PWM device 162 * @internal_mode_pattern: internal mode pattern for internal mode 163 * [0 - 3]: valid pattern number 164 * @pattern_cycle: the number of cycles of the waveform 165 * for the internal mode pattern 166 * [0 - 15]: available cycles 167 * @pattern_signal_period: period of the waveform for the internal mode pattern 168 * [0 - 255]: available period 169 */ 170struct max8997_haptic_platform_data { |
193 int pwm_channel_id; 194 int pwm_period; | 171 unsigned int pwm_channel_id; 172 unsigned int pwm_period; |
195 196 enum max8997_haptic_motor_type type; 197 enum max8997_haptic_pulse_mode mode; 198 enum max8997_haptic_pwm_divisor pwm_divisor; 199 | 173 174 enum max8997_haptic_motor_type type; 175 enum max8997_haptic_pulse_mode mode; 176 enum max8997_haptic_pwm_divisor pwm_divisor; 177 |
200 int internal_mode_pattern; 201 int pattern_cycle; 202 int pattern_signal_period; | 178 unsigned int internal_mode_pattern; 179 unsigned int pattern_cycle; 180 unsigned int pattern_signal_period; |
203}; 204 | 181}; 182 |
183enum max8997_led_mode { 184 MAX8997_NONE, 185 MAX8997_FLASH_MODE, 186 MAX8997_MOVIE_MODE, 187 MAX8997_FLASH_PIN_CONTROL_MODE, 188 MAX8997_MOVIE_PIN_CONTROL_MODE, 189}; 190 191/** 192 * struct max8997_led_platform_data 193 * The number of LED devices for MAX8997 is two 194 * @mode: LED mode for each LED device 195 * @brightness: initial brightness for each LED device 196 * range: 197 * [0 - 31]: MAX8997_FLASH_MODE and MAX8997_FLASH_PIN_CONTROL_MODE 198 * [0 - 15]: MAX8997_MOVIE_MODE and MAX8997_MOVIE_PIN_CONTROL_MODE 199 */ 200struct max8997_led_platform_data { 201 enum max8997_led_mode mode[2]; 202 u8 brightness[2]; 203}; 204 |
|
205struct max8997_platform_data { 206 /* IRQ */ 207 int irq_base; 208 int ono; 209 int wakeup; 210 211 /* ---- PMIC ---- */ 212 struct max8997_regulator_data *regulators; --- 40 unchanged lines hidden --- | 205struct max8997_platform_data { 206 /* IRQ */ 207 int irq_base; 208 int ono; 209 int wakeup; 210 211 /* ---- PMIC ---- */ 212 struct max8997_regulator_data *regulators; --- 40 unchanged lines hidden --- |