static void __init em_x270_init_i2c(void) { pxa_set_i2c_info(&em_x270_i2c_info); if (machine_is_exeda()) i2c_register_board_info(0, ARRAY_AND_SIZE(exeda_i2c_info)); }
static void __init em_x270_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); #ifdef CONFIG_PM pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); #endif if (machine_is_em_x270()) em_x270_module_init(); else if (machine_is_exeda()) em_x270_exeda_init(); else panic("Unsupported machine: %d\n", machine_arch_type); em_x270_init_da9030(); em_x270_init_dm9000(); em_x270_init_rtc(); em_x270_init_nand(); em_x270_init_nor(); em_x270_init_lcd(); em_x270_init_mmc(); em_x270_init_ohci(); em_x270_init_keypad(); em_x270_init_gpio_keys(); em_x270_init_ac97(); em_x270_init_spi(); em_x270_init_i2c(); em_x270_init_camera(); em_x270_userspace_consumers_init(); }
static int em_x270_libertas_teardown(struct spi_device *spi) { gpio_set_value(GPIO115_WLAN_PWEN, 0); gpio_free(GPIO115_WLAN_PWEN); gpio_free(GPIO19_WLAN_STRAP); if (machine_is_exeda()) { gpio_set_value(GPIO37_WLAN_RST, 0); gpio_free(GPIO37_WLAN_RST); } return 0; }
static int __init em_x270_init(void) { int ret; if (!(machine_is_em_x270() || machine_is_exeda() || machine_is_cm_x300())) return -ENODEV; em_x270_snd_device = platform_device_alloc("soc-audio", -1); if (!em_x270_snd_device) return -ENOMEM; platform_set_drvdata(em_x270_snd_device, &em_x270); ret = platform_device_add(em_x270_snd_device); if (ret) platform_device_put(em_x270_snd_device); return ret; }
static int em_x270_libertas_setup(struct spi_device *spi) { int err = gpio_request(GPIO115_WLAN_PWEN, "WLAN PWEN"); if (err) return err; err = gpio_request(GPIO19_WLAN_STRAP, "WLAN STRAP"); if (err) goto err_free_pwen; if (machine_is_exeda()) { err = gpio_request(GPIO37_WLAN_RST, "WLAN RST"); if (err) goto err_free_strap; gpio_direction_output(GPIO37_WLAN_RST, 1); msleep(100); } gpio_direction_output(GPIO19_WLAN_STRAP, 1); msleep(100); pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_libertas_pin_config)); gpio_direction_output(GPIO115_WLAN_PWEN, 0); msleep(100); gpio_set_value(GPIO115_WLAN_PWEN, 1); msleep(100); spi->bits_per_word = 16; spi_setup(spi); return 0; err_free_strap: gpio_free(GPIO19_WLAN_STRAP); err_free_pwen: gpio_free(GPIO115_WLAN_PWEN); return err; }