{ if (atomic_dec_return(&shuttle_touch_powered) == 0) { pr_info("Disabling touchscreen\n"); gpio_direction_output(SHUTTLE_TS_DISABLE, 1); // Power down } } struct it7260_platform_data it7260_pdata = { .disable_tp = shuttle_touch_disable, /* function to disable the touchpad */ .enable_tp = shuttle_touch_enable, /* function to enable the touchpad */ }; static struct i2c_board_info __initdata shuttle_i2c_bus4_touch_info_it[] = { { I2C_BOARD_INFO("it7260", 0x46), .irq = TEGRA_GPIO_TO_IRQ(SHUTTLE_TS_IRQ), .platform_data = &it7260_pdata, }, }; struct egalax_platform_data egalax_pdata = { .disable_tp = shuttle_touch_disable, /* function to disable the touchpad */ .enable_tp = shuttle_touch_enable, /* function to enable the touchpad */ }; static struct i2c_board_info __initdata shuttle_i2c_bus4_touch_info_egalax[] = { { I2C_BOARD_INFO("egalax", 0x04), .irq = TEGRA_GPIO_TO_IRQ(SHUTTLE_TS_IRQ), .platform_data = &egalax_pdata,
.ps1_thd_set = 0x3, .ps1_thd_no_cal = 0x3, .ps1_thd_with_cal = 0x3, .ps_conf1_val = CM3629_PS_DR_1_320 | CM3629_PS_IT_1_3T | CM3629_PS1_PERS_4, .ps_conf2_val = CM3629_PS_ITB_1 | CM3629_PS_ITR_1 | CM3629_PS2_INT_DIS | CM3629_PS1_INT_DIS, .ps_conf3_val = CM3629_PS2_PROL_32, .dark_level = 3, }; static struct i2c_board_info i2c_CM3628_devices[] = { { I2C_BOARD_INFO("cm3628", 0xc0 >> 1), .platform_data = &cm3628_pdata, .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PK2), } }; static struct i2c_board_info i2c_CM3629_devices[] = { { I2C_BOARD_INFO(CM3629_I2C_NAME, 0xC0 >> 1), .platform_data = &cm3629_pdata, .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PK2), }, }; static void psensor_init(void) { if(ps_type) { i2c_register_board_info(0,
.orientation = MPU_ACCEL_ORIENTATION, /* Located in board_[platformname].h */ }; #endif static struct ext_slave_platform_data mpu_compass_data = { .address = MPU_COMPASS_ADDR, .irq = 0, .adapt_num = MPU_COMPASS_BUS_NUM, .bus = EXT_SLAVE_BUS_PRIMARY, .orientation = MPU_COMPASS_ORIENTATION, /* Located in board_[platformname].h */ }; static struct i2c_board_info __initdata inv_mpu_i2c2_board_info[] = { { I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR), .irq = TEGRA_GPIO_TO_IRQ(MPU_GYRO_IRQ_GPIO), .platform_data = &mpu_gyro_data, }, #if (MPU_GYRO_TYPE == MPU_TYPE_MPU3050) { I2C_BOARD_INFO(MPU_ACCEL_NAME, MPU_ACCEL_ADDR), #if MPU_ACCEL_IRQ_GPIO .irq = TEGRA_GPIO_TO_IRQ(MPU_ACCEL_IRQ_GPIO), #endif .platform_data = &mpu_accel_data, }, #endif { I2C_BOARD_INFO(MPU_COMPASS_NAME, MPU_COMPASS_ADDR), #if MPU_COMPASS_IRQ_GPIO .irq = TEGRA_GPIO_TO_IRQ(MPU_COMPASS_IRQ_GPIO),
static struct resource enterprise_bluesleep_resources[] = { [0] = { .name = "gpio_host_wake", .start = TEGRA_GPIO_PS2, .end = TEGRA_GPIO_PS2, .flags = IORESOURCE_IO, }, [1] = { .name = "gpio_ext_wake", .start = TEGRA_GPIO_PE7, .end = TEGRA_GPIO_PE7, .flags = IORESOURCE_IO, }, [2] = { .name = "host_wake", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; static struct platform_device enterprise_bluesleep_device = { .name = "bluesleep", .id = -1, .num_resources = ARRAY_SIZE(enterprise_bluesleep_resources), .resource = enterprise_bluesleep_resources, }; static void __init enterprise_setup_bluesleep(void) { platform_device_register(&enterprise_bluesleep_device);
pr_info("kai_bt_st"); platform_device_register(&wl128x_device); platform_device_register(&btwilink_device); } static struct resource kai_bluesleep_resources[] = { [0] = { .name = "gpio_host_wake", .start = TEGRA_GPIO_PU6, .end = TEGRA_GPIO_PU6, .flags = IORESOURCE_IO, }, [1] = { .name = "host_wake", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; static struct platform_device kai_bluesleep_device = { .name = "bluesleep", .id = 0, .num_resources = ARRAY_SIZE(kai_bluesleep_resources), .resource = kai_bluesleep_resources, }; static noinline void __init kai_tegra_setup_tibluesleep(void) { platform_device_register(&kai_bluesleep_device);
static int cardhu_wifi_status_register(void (*callback)(int , void *), void *); static int cardhu_wifi_reset(int on); static int cardhu_wifi_power(int on); static int cardhu_wifi_set_carddetect(int val); static struct wifi_platform_data cardhu_wifi_control = { .set_power = cardhu_wifi_power, .set_reset = cardhu_wifi_reset, .set_carddetect = cardhu_wifi_set_carddetect, }; static struct resource wifi_resource[] = { [0] = { .name = "bcmdhd_wlan_irq", .start = TEGRA_GPIO_TO_IRQ(CARDHU_WLAN_WOW), .end = TEGRA_GPIO_TO_IRQ(CARDHU_WLAN_WOW), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, }, }; static struct platform_device cardhu_wifi_device = { .name = "bcmdhd_wlan", .id = 1, .num_resources = 1, .resource = wifi_resource, .dev = { .platform_data = &cardhu_wifi_control, }, };
&tegra_spdif_device, &tegra_avp_device, &tegra_camera, &tegra_das_device, }; #ifdef CONFIG_TOUCHSCREEN_PANJIT_I2C static struct panjit_i2c_ts_platform_data panjit_data = { .gpio_reset = TEGRA_GPIO_PQ7, }; static const struct i2c_board_info ventana_i2c_bus1_touch_info[] = { { I2C_BOARD_INFO("panjit_touch", 0x3), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6), .platform_data = &panjit_data, }, }; static int __init ventana_touch_init_panjit(void) { tegra_gpio_enable(TEGRA_GPIO_PV6); tegra_gpio_enable(TEGRA_GPIO_PQ7); i2c_register_board_info(0, ventana_i2c_bus1_touch_info, 1); return 0; } #endif
// static int lx_wifi_reset(int on); static int lx_wifi_power(int on); static int lx_wifi_set_carddetect(int val); static struct wifi_platform_data lx_wifi_control = { .set_power = lx_wifi_power, .set_reset = lx_wifi_reset, .set_carddetect = lx_wifi_set_carddetect, }; static struct resource wifi_resource[] = { [0] = { .name = "bcmdhd_wlan_irq", .start = TEGRA_GPIO_TO_IRQ(LX_WLAN_WOW), .end = TEGRA_GPIO_TO_IRQ(LX_WLAN_WOW), //for HW_OOB .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_SHAREABLE, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, }, }; static struct platform_device lx_wifi_device = { .name = "bcmdhd_wlan", .id = 1, .num_resources = 1, .resource = wifi_resource, .dev = { .platform_data = &lx_wifi_control, }, };
#include <asm/mach-types.h> #include <mach/irqs.h> #include <mach/iomap.h> #include <mach/pinmux.h> #include <linux/interrupt.h> #include <linux/input.h> #include "board-adam.h" #include "gpio-names.h" struct at168_i2c_ts_platform_data at168_pdata = { .gpio_reset = ADAM_TS_RESET, .gpio_power = ADAM_TS_POWER, }; static struct i2c_board_info __initdata adam_i2c_bus0_touch_info_at168[] = { { I2C_BOARD_INFO("at168_touch", 0x5c), .irq = TEGRA_GPIO_TO_IRQ(ADAM_TS_IRQ), .platform_data = &at168_pdata, }, }; int __init adam_touch_register_devices(void) { i2c_register_board_info(0, adam_i2c_bus0_touch_info_at168, 1); return 0; }
static struct nct1008_platform_data enterprise_nct1008_pdata = { .supported_hwrev = true, .ext_range = true, .conv_rate = 0x08, .hysteresis = 5, .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */ .shutdown_ext_limit = 90, .shutdown_local_limit = 90, .throttling_ext_limit = 85, .alarm_fn = tegra_throttling_enable, }; static struct i2c_board_info enterprise_i2c4_nct1008_board_info[] = { { I2C_BOARD_INFO("nct1008", 0x4C), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH7), .platform_data = &enterprise_nct1008_pdata, } }; static void enterprise_nct1008_init(void) { int ret; #ifdef CONFIG_TEGRA_EDP_LIMITS const struct tegra_edp_limits *z; int zones_sz; int i; bool throttle_ok = false; #endif tegra_gpio_enable(TEGRA_GPIO_PH7);
* more details. */ #include <linux/kernel.h> #include <linux/gpio.h> #include <linux/init.h> #include <linux/io.h> #include <mach/iomap.h> #include <mach/irqs.h> #include <mach/gpio.h> #include "gpio-names.h" static int tegra_wake_event_irq[] = { TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PO5), /* wake0 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV1), /* wake1 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PL1), /* wake2 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PB6), /* wake3 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN7), /* wake4 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PBB6), /* wake5 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU5), /* wake6 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), /* wake7 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PC7), /* wake8 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS2), /* wake9 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PAA1), /* wake10 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PW3), /* wake11 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PW2), /* wake12 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PY6), /* wake13 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PDD3), /* wake14 */ TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PJ2), /* wake15 */
static struct nct1008_platform_data ventana_nct1008_pdata = { .supported_hwrev = true, .ext_range = false, .conv_rate = 0x08, .offset = 0, .hysteresis = 0, .shutdown_ext_limit = 115, .shutdown_local_limit = 120, .throttling_ext_limit = 90, .alarm_fn = tegra_throttling_enable, }; static const struct i2c_board_info ventana_i2c0_board_info[] = { { I2C_BOARD_INFO("isl29018", 0x44), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PZ2), }, { I2C_BOARD_INFO("ami304", 0x0E), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN5), }, { I2C_BOARD_INFO("kxtf9", 0x0F), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PN4), }, }; static const struct i2c_board_info ventana_i2c2_board_info[] = { { I2C_BOARD_INFO("bq20z45-battery", 0x0B), //.irq = TEGRA_GPIO_TO_IRQ(AC_PRESENT_GPIO),
#include <linux/delay.h> #include <linux/i2c.h> #include <linux/init.h> #include <linux/input.h> #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/gpio.h> #include "board-smba1002.h" #include "gpio-names.h" static struct i2c_board_info __initdata smba1002_i2c_bus0_sensor_info[] = { { I2C_BOARD_INFO("bq20z75-battery", 0x0B), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH2), }, { I2C_BOARD_INFO("so340010_kbd", 0x2c), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6), }, { I2C_BOARD_INFO("isl29023", 0x44), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV5), }, { I2C_BOARD_INFO("lis3lv02d", 0x1C), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PJ0), }, {
static struct resource ventana_bluesleep_resources[] = { [0] = { .name = "gpio_host_wake", .start = TEGRA_GPIO_PU6, .end = TEGRA_GPIO_PU6, .flags = IORESOURCE_IO, }, [1] = { .name = "gpio_ext_wake", .start = TEGRA_GPIO_PU1, .end = TEGRA_GPIO_PU1, .flags = IORESOURCE_IO, }, [2] = { .name = "host_wake", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; static struct platform_device ventana_bluesleep_device = { .name = "bluesleep", .id = -1, .num_resources = ARRAY_SIZE(ventana_bluesleep_resources), .resource = ventana_bluesleep_resources, }; extern void bluesleep_setup_uart_port(struct platform_device *uart_dev); static void __init ventana_setup_bluesleep(void) {
#define VENTANA_WLAN_IRQ TEGRA_GPIO_PS0 static void (*wifi_status_cb)(int card_present, void *dev_id); static void *wifi_status_cb_devid; static int ventana_wifi_status_register(void (*callback)(int , void *), void *); static struct clk *wifi_32k_clk; static int ventana_wifi_reset(int on); static int ventana_wifi_power(int on); static int ventana_wifi_set_carddetect(int val); #if defined(CONFIG_BCM4329_HW_OOB) || defined(CONFIG_BCM4329_OOB_INTR_ONLY) static struct resource ventana_wifi_wakeup_resources[] = { { .name = "bcm4329_wlan_irq", .start = TEGRA_GPIO_TO_IRQ(VENTANA_WLAN_IRQ), .end = TEGRA_GPIO_TO_IRQ(VENTANA_WLAN_IRQ), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, }, }; #endif //CONFIG_BCM4329_HW_OOB || CONFIG_BCM4329_OOB_INTR_ONLY static struct wifi_platform_data ventana_wifi_control = { .set_power = ventana_wifi_power, .set_reset = ventana_wifi_reset, .set_carddetect = ventana_wifi_set_carddetect, }; static struct platform_device ventana_wifi_device = { .name = "bcm4329_wlan", .id = 1,
.supported_hwrev = true, .ext_range = false, .conv_rate = 0x08, .offset = 0, .hysteresis = 0, .shutdown_ext_limit = 115, .shutdown_local_limit = 120, .throttling_ext_limit = 90, .alarm_fn = tegra_throttling_enable, }; static struct i2c_board_info sec_gpio_i2c9_info[] = { { I2C_BOARD_INFO("nct1008", 0x4C), .platform_data = &p3_nct1008_pdata, .irq = TEGRA_GPIO_TO_IRQ(GPIO_nTHRM_IRQ), }, }; static struct i2c_board_info sec_gpio_i2c10_info[] = { { I2C_BOARD_INFO("image_convertor", 0x38), }, }; static struct i2c_board_info sec_gpio_i2c11_info[] = { { I2C_BOARD_INFO("max1237", 0x34), }, { I2C_BOARD_INFO("stmpe811", 0x82>>1),
*/ static struct max17043_platform_data max17043_pdata = { .alert_flag = 0x1F, /* 1% fuel alert */ .charging_rcomp = 0xE7, /* modified 2011.05.09 by MAXIM */ .discharging_rcomp = 0xD7, .standard_temp = 20, .comp_full = 9680, /* 2011.06.15 modified to 96.8 becase of topoff current changing */ .comp_empty = 0, /* 0 */ .low_batt_cb = max17043_low_batt_cb, }; static struct i2c_board_info __initdata n1_fuelgauge[] = { { I2C_BOARD_INFO("max17043", 0x36), .platform_data = &max17043_pdata, .irq = TEGRA_GPIO_TO_IRQ(GPIO_FUEL_ALERT), }, }; static void n1_max17043_gpio_init(void) { tegra_gpio_enable(GPIO_FUEL_ALERT); gpio_request(GPIO_FUEL_ALERT, "fuel_alert"); gpio_direction_input(GPIO_FUEL_ALERT); } extern enum cable_type_t set_cable_status; struct gpioi2c_otg_data otg_data;
static struct resource cardhu_bluesleep_resources[] = { [0] = { .name = "gpio_host_wake", .start = TEGRA_GPIO_PU6, .end = TEGRA_GPIO_PU6, .flags = IORESOURCE_IO, }, [1] = { .name = "gpio_ext_wake", .start = TEGRA_GPIO_PU1, .end = TEGRA_GPIO_PU1, .flags = IORESOURCE_IO, }, [2] = { .name = "host_wake", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; static struct platform_device cardhu_bluesleep_device = { .name = "bluesleep", .id = -1, .num_resources = ARRAY_SIZE(cardhu_bluesleep_resources), .resource = cardhu_bluesleep_resources, }; static noinline void __init cardhu_setup_bluesleep(void) { platform_device_register(&cardhu_bluesleep_device);
static struct platform_device *seaboard_devices[] __initdata = { &debug_uart, &tegra_pmu_device, &tegra_sdhci_device4, &tegra_sdhci_device3, &tegra_sdhci_device1, &seaboard_gpio_keys_device, &tegra_i2s_device1, &tegra_das_device, &tegra_pcm_device, &seaboard_audio_device, }; static struct i2c_board_info __initdata isl29018_device = { I2C_BOARD_INFO("isl29018", 0x44), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), }; static struct i2c_board_info __initdata adt7461_device = { I2C_BOARD_INFO("adt7461", 0x4c), }; static struct wm8903_platform_data wm8903_pdata = { .irq_active_low = 0, .micdet_cfg = 0, .micdet_delay = 100, .gpio_base = SEABOARD_GPIO_WM8903(0), .gpio_cfg = { 0, 0, WM8903_GPIO_CONFIG_ZERO,
.micdet_cfg = 0, .micdet_delay = 100, .gpio_base = HARMONY_GPIO_WM8903(0), .gpio_cfg = { WM8903_GPIO_NO_CONFIG, WM8903_GPIO_NO_CONFIG, 0, WM8903_GPIO_NO_CONFIG, WM8903_GPIO_NO_CONFIG, }, }; static struct i2c_board_info __initdata wm8903_board_info = { I2C_BOARD_INFO("wm8903", 0x1a), .platform_data = &harmony_wm8903_pdata, .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ), }; static void __init harmony_i2c_init(void) { platform_device_register(&tegra_i2c_device1); platform_device_register(&tegra_i2c_device2); platform_device_register(&tegra_i2c_device3); platform_device_register(&tegra_i2c_device4); i2c_register_board_info(0, &wm8903_board_info, 1); } static struct platform_device *harmony_devices[] __initdata = { &debug_uart, &tegra_sdhci_device1,
static struct nct1008_platform_data scorpio_nct1008_pdata = { .supported_hwrev = true, .ext_range = false, .conv_rate = 0x08, .offset = 0, .hysteresis = 0, .shutdown_ext_limit = 115, .shutdown_local_limit = 120, .throttling_ext_limit = 90, .alarm_fn = tegra_throttling_enable, }; static const struct i2c_board_info scorpio_i2c0_board_info[] = { { I2C_BOARD_INFO("isl29018", 0x44), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PZ2), }, }; static const struct i2c_board_info scorpio_i2c2_board_info[] = { { I2C_BOARD_INFO("bq20z75", 0x0B), }, }; static const struct i2c_board_info scorpio_i2c3_board_info_ssl3250a[] = { { I2C_BOARD_INFO("ssl3250a", 0x30), .platform_data = &scorpio_ssl3250a_pdata, }, };
.blen = 0x20, .threshold = 0x3C, .voltage = 3300000, /* 3.3V */ .orient = 5, .config = config, .config_length = 157, .config_crc = MXT_CONFIG_CRC, .irqflags = IRQF_TRIGGER_FALLING, /* .read_chg = &read_chg, */ .read_chg = NULL, }; static struct i2c_board_info __initdata atmel_i2c_info[] = { { I2C_BOARD_INFO("atmel_mxt_ts", 0x5A), .irq = TEGRA_GPIO_TO_IRQ(TOUCH_GPIO_IRQ_ATMEL_T9), .platform_data = &atmel_mxt_info, } }; static __initdata struct tegra_clk_init_table spi_clk_init_table[] = { /* name parent rate enabled */ { "sbc1", "pll_p", 52000000, true}, { NULL, NULL, 0, 0}, }; static int __init p1852_touch_init(void) { gpio_request(TOUCH_GPIO_IRQ_ATMEL_T9, "atmel-irq"); gpio_direction_input(TOUCH_GPIO_IRQ_ATMEL_T9);
.negate_x = 0, .negate_y = 0, .negate_z = 0, .exit = tegra_l3g4200d_exit, .power_on = tegra_l3g4200d_power_on, .power_off = tegra_l3g4200d_power_off, }; */ static struct i2c_board_info __initdata olympus_i2c_bus4_board_info[] = { { I2C_BOARD_INFO("akm8975", 0x0C), // .platform_data = &akm8975_data, .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PE2), }, { I2C_BOARD_INFO("kxtf9", 0x0F), .platform_data = &kxtf9_data, }, }; void __init mot_sensors_init(void) { kxtf9_init(); tegra_akm8975_init(); tegra_vibrator_init(); if(!(bi_powerup_reason() & PWRUP_BAREBOARD)) { isl29030_init();
tegra_thermal_set_device(thermal_device); } static struct nct1008_platform_data enterprise_nct1008_pdata = { .supported_hwrev = true, .ext_range = true, .conv_rate = 0x08, .offset = 8, /* 4 * 2C. Bug 844025 - 1C for device accuracies */ .probe_callback = nct1008_probe_callback, }; static struct i2c_board_info enterprise_i2c4_nct1008_board_info[] = { { I2C_BOARD_INFO("nct1008", 0x4C), .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PH7), .platform_data = &enterprise_nct1008_pdata, } }; static void enterprise_nct1008_init(void) { int ret; tegra_gpio_enable(TEGRA_GPIO_PH7); ret = gpio_request(TEGRA_GPIO_PH7, "temp_alert"); if (ret < 0) { pr_err("%s: gpio_request failed %d\n", __func__, ret); return; }
tegra_gpio_enable(ADXL34X_IRQ_GPIO); gpio_request(ADXL34X_IRQ_GPIO, "adxl34x"); gpio_direction_input(ADXL34X_IRQ_GPIO); } static void whistler_isl29018_init(void) { tegra_gpio_enable(ISL29018_IRQ_GPIO); gpio_request(ISL29018_IRQ_GPIO, "isl29018"); gpio_direction_input(ISL29018_IRQ_GPIO); } static struct i2c_board_info whistler_i2c1_board_info[] = { { I2C_BOARD_INFO("adxl34x", 0x1D), .irq = TEGRA_GPIO_TO_IRQ(ADXL34X_IRQ_GPIO), }, { I2C_BOARD_INFO("isl29018", 0x44), .irq = TEGRA_GPIO_TO_IRQ(ISL29018_IRQ_GPIO), }, }; static void whistler_adt7461_init(void) { tegra_gpio_enable(ADT7461_IRQ_GPIO); } static struct adt7461_platform_data whistler_adt7461_pdata = { .supported_hwrev = true, .ext_range = false,
static int p3_wifi_power(int on); static int p3_wifi_set_carddetect(int val); static struct wifi_platform_data p3_wifi_control = { .set_power = p3_wifi_power, .set_reset = p3_wifi_reset, .set_carddetect = p3_wifi_set_carddetect, #ifdef CONFIG_BROADCOM_WIFI_RESERVED_MEM .mem_prealloc = brcm_wlan_mem_prealloc, #endif }; static struct resource wifi_resource[] = { [0] = { .name = "bcmdhd_wlan_irq", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS0), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS0), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, }, }; static struct platform_device p3_wifi_device = { .name = "bcmdhd_wlan", .id = 1, .num_resources = 1, .resource = wifi_resource, .dev = { .platform_data = &p3_wifi_control, }, };
.orientation = { 0, -1, 0, 1, 0, 0, 0, 0, 1 }, #endif }, .pressure = { .get_slave_descr = NULL, .irq = 0, .bus = EXT_SLAVE_BUS_INVALID, }, }; static const struct i2c_board_info p3_i2c_mpu_sensor_board_info[] = { { I2C_BOARD_INFO("mpu3050", 0x68), .irq = TEGRA_GPIO_TO_IRQ(GPIO_MPU_INT), .platform_data = &p3_mpu3050_pdata, }, { I2C_BOARD_INFO("kxtf9", 0x0F), }, }; static const struct i2c_board_info p3_i2c2_board_info[] = { { I2C_BOARD_INFO("bq20z75-battery", 0x0B), }, }; static int bh1721fvc_light_sensor_reset(void) {
static int kai_wifi_set_carddetect(int val); static int kai_wifi_status_register( void (*callback)(int card_present, void *dev_id), void *dev_id) { if (wifi_status_cb) return -EAGAIN; wifi_status_cb = callback; wifi_status_cb_devid = dev_id; return 0; } static struct wl12xx_platform_data kai_wlan_data __initdata = { .irq = TEGRA_GPIO_TO_IRQ(KAI_WLAN_IRQ), .board_ref_clock = WL12XX_REFCLOCK_26, .board_tcxo_clock = 1, .set_power = kai_wifi_power, .set_carddetect = kai_wifi_set_carddetect, }; static struct resource sdhci_resource0[] = { [0] = { .start = INT_SDMMC1, .end = INT_SDMMC1, .flags = IORESOURCE_IRQ, }, [1] = { .start = TEGRA_SDMMC1_BASE, .end = TEGRA_SDMMC1_BASE + TEGRA_SDMMC1_SIZE-1,
static void (*wifi_status_cb)(int card_present, void *dev_id); static void *wifi_status_cb_devid; static int enterprise_wifi_status_register(void (*callback)(int , void *), void *); static int enterprise_wifi_reset(int on); static int enterprise_wifi_power(int on); static int enterprise_wifi_set_carddetect(int val); static struct wifi_platform_data enterprise_wifi_control = { .set_power = enterprise_wifi_power, .set_reset = enterprise_wifi_reset, .set_carddetect = enterprise_wifi_set_carddetect, }; static struct wl12xx_platform_data enterprise_wl12xx_wlan_data __initdata = { .irq = TEGRA_GPIO_TO_IRQ(ENTERPRISE_WLAN_WOW), .board_ref_clock = WL12XX_REFCLOCK_26, .board_tcxo_clock = 1, .set_power = enterprise_wifi_power, .set_carddetect = enterprise_wifi_set_carddetect, }; static struct resource wifi_resource[] = { [0] = { .name = "bcm4329_wlan_irq", .start = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .end = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PU6), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE, }, };