static int __init mapphone_init_keypad(void) { int status; int is_slider_found = 0; #ifdef CONFIG_ARM_OF int slider_gpio, i; int array_size = 0; /* * For those h/w don't have slider, there will be no slider_data * in devtree. All other h/w should provide slider_data. * There is no default gpio for it */ slider_gpio = get_gpio_by_name("slider_data"); if (slider_gpio > 0) for (i = 0; i < ARRAY_SIZE(mapphone_switch_map); i++) if (SW_LID == mapphone_switch_map[i].code) { mapphone_switch_map[i].gpio = slider_gpio; is_slider_found = 1; break; } if (is_slider_found) { mapphone_switch_info[0] = &mapphone_keypad_matrix_info.info; mapphone_switch_info[1] = &mapphone_switch_input_info.info; array_size = 2; mapphone_switch_data.info = mapphone_switch_info; mapphone_switch_data.info_count = array_size; } if (mapphone_dt_kp_init() != 0) printk(KERN_INFO "Keypad: using non-dt configuration\n"); #ifdef CONFIG_INPUT_KEYRESET if (mapphone_dt_kpreset_init()) printk(KERN_INFO "Keypadreset init failed\n"); #endif #endif platform_device_register(&mapphone_reset_keys_device); if (is_slider_found) platform_device_register(&mapphone_switch_device); status = omap4_keypad_initialization(&omap_kp_data); if (status) pr_err("Keypad initialization failed: %d\n", status); return status; }
void __init acclaim_peripherals_init(void) { int status; int package = OMAP_PACKAGE_CBS; ulong sdram_size = get_sdram_size(); ramconsole_init(); if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, package); acclaim_board_init(); if (sdram_vendor() == SAMSUNG_SDRAM) { if (sdram_size == SZ_512M) { omap_emif_setup_device_details(&emif_devices_512_samsung, &emif_devices_512_samsung); } else if (sdram_size == SZ_1G) { omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung); } else { pr_err("sdram memory size does not exist, default to using 1024MB \n"); omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung); } printk(KERN_INFO"Samsung DDR Memory \n"); } else if (sdram_vendor() == ELPIDA_SDRAM) { if (sdram_size == SZ_512M) { omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida); } else if (sdram_size == SZ_1G) { omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida); } else { pr_err("sdram memory size does not exist, default to using 1024MB \n"); omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida); } printk(KERN_INFO"Elpida DDR Memory \n"); } else if (sdram_vendor() == HYNIX_SDRAM) { /* Re-use ELPIDA timings as they are absolutely the same */ if (sdram_size == SZ_512M) { omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida); } else if (sdram_size == SZ_1G) { omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida); } else { pr_err("sdram memory size does not exist, default to using 1024MB \n"); omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida); } printk(KERN_INFO"Hynix DDR Memory \n"); } else pr_err("Memory type does not exist\n"); omap_init_emif_timings(); enable_rtc_gpio(); omap4_i2c_init(); platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); acclaim_init_charger(); wake_lock_init(&uart_lock, WAKE_LOCK_SUSPEND, "uart_wake_lock"); omap_serial_init(omap_serial_platform_data); omap4_twl6030_hsmmc_init(mmc); #ifdef CONFIG_TIWLAN_SDIO config_wlan_mux(); #else //omap4_4430sdp_wifi_init(); #endif kxtf9_dev_init(); #ifdef CONFIG_BATTERY_MAX17042 max17042_dev_init(); #endif usb_uhhtll_init(&usbhs_pdata); usb_musb_init(&musb_board_data); status = omap4_keypad_initialization(&sdp4430_keypad_data); if (status) pr_err("Keypad initialization failed: %d\n", status); spi_register_board_info(sdp4430_spi_board_info, ARRAY_SIZE(sdp4430_spi_board_info)); acclaim_panel_init(); enable_board_wakeup_source(); omap_voltage_register_pmic(&omap_pmic_core, "core"); omap_voltage_register_pmic(&omap_pmic_mpu, "mpu"); omap_voltage_register_pmic(&omap_pmic_iva, "iva"); omap_voltage_init_vc(&vc_config); }