{ .code = KEY_F23, .gpio = 1 << 8, }, }; static struct gpio_event_microp_info doubleshot_keypad_microp_info = { .info.func = gpio_event_microp_func, #ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL .info.oj_btn = true, #endif .flags = GPIOEDF_PRINT_KEYS, .type = EV_KEY, .keymap = doubleshot_microp_key_map, .keymap_size = ARRAY_SIZE(doubleshot_microp_key_map), .irq = MSM_uP_TO_INT(0), .microp_info = 0x53, /*project code*/ }; #endif static struct gpio_event_info *doubleshot_keypad_info[] = { &doubleshot_keypad_input_info.info, &doubleshot_keypad_switch_info.info, &doubleshot_keypad_matrix_info.info, #ifdef CONFIG_INPUT_MICROP &doubleshot_keypad_microp_info.info, #endif }; static struct gpio_event_platform_data doubleshot_keypad_data = { .names = {
static int capella_cm3602_power(int pwr_device, uint8_t enable); static struct microp_function_config microp_functions[] = { { .name = "light_sensor", .category = MICROP_FUNCTION_LSENSOR, .levels = { 0x000, 0x001, 0x00F, 0x01E, 0x03C, 0x121, 0x190, 0x2BA, 0x35C, 0x3FF }, .channel = 6, .int_pin = IRQ_LSENSOR, .golden_adc = 0xC0, .ls_power = capella_cm3602_power, }, }; static struct lightsensor_platform_data lightsensor_data = { .config = µp_functions[0], .irq = MSM_uP_TO_INT(9), }; static struct platform_device microp_devices[] = { { .name = "lightsensor_microp", .dev = { .platform_data = &lightsensor_data, }, }, }; static struct microp_i2c_platform_data microp_data = { .num_functions = ARRAY_SIZE(microp_functions), .microp_function = microp_functions, .num_devices = ARRAY_SIZE(microp_devices),
.key_enable_gpio = 0, .mic_select_gpio = 0, }; static struct platform_device htc_headset_gpio = { .name = "HTC_HEADSET_GPIO", .id = -1, .dev = { .platform_data = &htc_headset_gpio_data, }, }; /* HTC_HEADSET_MICROP Driver */ static struct htc_headset_microp_platform_data htc_headset_microp_data = { .remote_int = 1 << 5, .remote_irq = MSM_uP_TO_INT(5), .remote_enable_pin = 0, .adc_channel = 0x01, .adc_remote = {0, 33, 38, 82, 95, 167}, }; static struct platform_device htc_headset_microp = { .name = "HTC_HEADSET_MICROP", .id = -1, .dev = { .platform_data = &htc_headset_microp_data, }, }; /* HTC_HEADSET_MGR Driver */ static struct platform_device *headset_devices[] = {
.name = "remote-key", .category = MICROP_FUNCTION_REMOTEKEY, .levels = {0, 33, 50, 110, 160, 220}, .channel = 1, .int_pin = 1 << 7, }, { .name = "reset-int", .category = MICROP_FUNCTION_RESET_INT, .int_pin = 1 << 8, }, }; static struct lightsensor_platform_data lightsensor_data = { .config = µp_functions[0], .irq = MSM_uP_TO_INT(9), }; static struct microp_led_config led_config[] = { { .name = "amber", .type = LED_RGB, }, { .name = "green", .type = LED_RGB, }, /* { .name = "wimax", .type = LED_WIMAX, },*/
}; static struct microp_function_config microp_lightsensor = { .name = "light_sensor", .category = MICROP_FUNCTION_LSENSOR, .levels = { 0, 11, 16, 22, 75, 209, 362, 488, 560, 0x3FF }, .channel = 3, .int_pin = 1 << 9, .golden_adc = 0xD2, .mask_w = {0x00, 0x00, 0x04}, .ls_power = capella_cm3602_power, }; static struct lightsensor_platform_data lightsensor_data = { .config = µp_lightsensor, .irq = MSM_uP_TO_INT(9), }; static struct microp_led_config led_config[] = { { .name = "amber", .type = LED_RGB, }, { .name = "green", .type = LED_RGB, }, }; static struct microp_led_platform_data microp_leds_data = { .num_leds = ARRAY_SIZE(led_config),
}, }; static struct microp_function_config microp_lightsensor = { .name = "light_sensor", .category = MICROP_FUNCTION_LSENSOR, .levels = { 3, 7, 12, 57, 114, 279, 366, 453, 540, 0x3FF }, .channel = 3, .int_pin = 1 << 9, .golden_adc = 0x118, .ls_power = capella_cm3602_power, }; static struct lightsensor_platform_data lightsensor_data = { .config = µp_lightsensor, .irq = MSM_uP_TO_INT(9), }; static struct microp_led_config led_config[] = { { .name = "amber", .type = LED_RGB, }, { .name = "green", .type = LED_RGB, }, { .name = "wimax", .type = LED_WIMAX, },
.key_enable_gpio = 0, .mic_select_gpio = 0, }; static struct platform_device htc_headset_gpio = { .name = "HTC_HEADSET_GPIO", .id = -1, .dev = { .platform_data = &htc_headset_gpio_data, }, }; /* HTC_HEADSET_MICROP Driver */ static struct htc_headset_microp_platform_data htc_headset_microp_data = { .remote_int = 1 << 13, .remote_irq = MSM_uP_TO_INT(13), .remote_enable_pin = 0, .adc_channel = 0x01, .adc_remote = {0, 33, 38, 82, 114, 163}, }; static struct htc_headset_microp_platform_data htc_headset_microp_data_xc = { .remote_int = 1 << 13, .remote_irq = MSM_uP_TO_INT(13), .remote_enable_pin = 0, .adc_channel = 0x01, .adc_remote = {0, 33, 38, 102, 114, 204}, }; static struct platform_device htc_headset_microp = { .name = "HTC_HEADSET_MICROP",
.name = "oj", .category = MICROP_FUNCTION_OJ, .int_pin = 1 << 12, }, { .name = "proximity", .category = MICROP_FUNCTION_P, .int_pin = 1 << 11, .mask_r = {0x00, 0x00, 0x10}, .mask_w = {0x00, 0x00, 0x04}, }, }; static struct lightsensor_platform_data lightsensor_data = { .config = µp_functions[0], .irq = MSM_uP_TO_INT(9), }; static struct microp_led_config led_config[] = { { .name = "amber", .type = LED_RGB, }, { .name = "green", .type = LED_RGB, }, /* { .name = "vkey-backlight", .type = LED_GPO, },*/