OLD | NEW |
1 /* | 1 /* |
2 * arch/arm/mach-tegra/board-seaboard.c | 2 * arch/arm/mach-tegra/board-seaboard.c |
3 * | 3 * |
4 * Copyright (c) 2010, NVIDIA Corporation. | 4 * Copyright (c) 2010, NVIDIA Corporation. |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License as published by | 7 * it under the terms of the GNU General Public License as published by |
8 * the Free Software Foundation; either version 2 of the License, or | 8 * the Free Software Foundation; either version 2 of the License, or |
9 * (at your option) any later version. | 9 * (at your option) any later version. |
10 * | 10 * |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 .bus_clk_rate = { 400000, 0 }, | 296 .bus_clk_rate = { 400000, 0 }, |
297 }; | 297 }; |
298 | 298 |
299 static struct tegra_i2c_platform_data seaboard_dvc_platform_data = { | 299 static struct tegra_i2c_platform_data seaboard_dvc_platform_data = { |
300 .adapter_nr = 4, | 300 .adapter_nr = 4, |
301 .bus_count = 1, | 301 .bus_count = 1, |
302 .bus_clk_rate = { 400000, 0 }, | 302 .bus_clk_rate = { 400000, 0 }, |
303 .is_dvc = true, | 303 .is_dvc = true, |
304 }; | 304 }; |
305 | 305 |
| 306 /* for Cypress Trackpad. */ |
| 307 #include <linux/cyapa.h> |
| 308 |
| 309 static int cyapa_i2c_platform_init(void) |
| 310 { |
| 311 return 0; |
| 312 } |
| 313 |
| 314 static int cyapa_i2c_platform_wakeup(void) |
| 315 { |
| 316 return 0; |
| 317 } |
| 318 |
| 319 static struct cyapa_platform_data cyapa_i2c_platform_data = { |
| 320 .flag = 0, |
| 321 .gen = CYAPA_GEN2, |
| 322 .power_state = CYAPA_PWR_ACTIVE, |
| 323 .use_absolute_mode = false, |
| 324 .use_polling_mode = false, |
| 325 .polling_interval_time_active = CYAPA_ACTIVE_POLLING_INTVAL_TIME, |
| 326 .polling_interval_time_lowpower = CYAPA_LOWPOWER_POLLING_INTVAL_TIME, |
| 327 .active_touch_timeout = CYAPA_ACTIVE_TOUCH_TIMEOUT, |
| 328 .name = CYAPA_I2C_NAME, |
| 329 .irq_gpio = TEGRA_GPIO_CYTP_INT, |
| 330 .report_rate = CYAPA_REPORT_RATE, |
| 331 |
| 332 .wakeup = cyapa_i2c_platform_wakeup, |
| 333 .init = cyapa_i2c_platform_init, |
| 334 }; |
| 335 |
306 static struct i2c_board_info __initdata seaboard_i2c0_devices[] = { | 336 static struct i2c_board_info __initdata seaboard_i2c0_devices[] = { |
307 { | 337 { |
308 I2C_BOARD_INFO("wm8903", 0x1a), | 338 I2C_BOARD_INFO("wm8903", 0x1a), |
309 }, | 339 }, |
310 { | 340 { |
311 I2C_BOARD_INFO("isl29018", 0x44), | 341 I2C_BOARD_INFO("isl29018", 0x44), |
312 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), | 342 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), |
313 }, | 343 }, |
| 344 { |
| 345 I2C_BOARD_INFO(CYAPA_I2C_NAME, 0x67), |
| 346 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CYTP_INT), |
| 347 .platform_data = &cyapa_i2c_platform_data, |
| 348 }, |
314 }; | 349 }; |
315 | 350 |
316 static struct i2c_board_info __initdata seaboard_i2c4_devices[] = { | 351 static struct i2c_board_info __initdata seaboard_i2c4_devices[] = { |
317 { | 352 { |
318 I2C_BOARD_INFO("adt7461", 0x4c), | 353 I2C_BOARD_INFO("adt7461", 0x4c), |
319 }, | 354 }, |
320 { | 355 { |
321 I2C_BOARD_INFO("ak8975", 0x0c), | 356 I2C_BOARD_INFO("ak8975", 0x0c), |
322 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_MAGNETOMETER), | 357 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_MAGNETOMETER), |
323 }, | 358 }, |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 seaboard_panel_init(); | 577 seaboard_panel_init(); |
543 seaboard_sdhci_init(); | 578 seaboard_sdhci_init(); |
544 seaboard_i2c_init(); | 579 seaboard_i2c_init(); |
545 seaboard_power_init(); | 580 seaboard_power_init(); |
546 seaboard_kbc_init(); | 581 seaboard_kbc_init(); |
547 | 582 |
548 seaboard_wlan_init(); | 583 seaboard_wlan_init(); |
549 | 584 |
550 tegra_gpio_enable(TEGRA_GPIO_LIDSWITCH); | 585 tegra_gpio_enable(TEGRA_GPIO_LIDSWITCH); |
551 tegra_gpio_enable(TEGRA_GPIO_POWERKEY); | 586 tegra_gpio_enable(TEGRA_GPIO_POWERKEY); |
| 587 |
| 588 /* for Cypress trackpad. */ |
| 589 tegra_gpio_enable(TEGRA_GPIO_CYTP_INT); |
| 590 gpio_request(TEGRA_GPIO_CYTP_INT, "gpio_cytp_int"); |
| 591 gpio_direction_input(TEGRA_GPIO_CYTP_INT); |
552 } | 592 } |
553 | 593 |
554 MACHINE_START(SEABOARD, "seaboard") | 594 MACHINE_START(SEABOARD, "seaboard") |
555 .boot_params = 0x00000100, | 595 .boot_params = 0x00000100, |
556 .init_irq = tegra_init_irq, | 596 .init_irq = tegra_init_irq, |
557 .init_machine = tegra_seaboard_init, | 597 .init_machine = tegra_seaboard_init, |
558 .map_io = tegra_map_common_io, | 598 .map_io = tegra_map_common_io, |
559 .timer = &tegra_timer, | 599 .timer = &tegra_timer, |
560 MACHINE_END | 600 MACHINE_END |
561 | 601 |
562 MACHINE_START(KAEN, "kaen") | 602 MACHINE_START(KAEN, "kaen") |
563 .boot_params = 0x00000100, | 603 .boot_params = 0x00000100, |
564 .init_irq = tegra_init_irq, | 604 .init_irq = tegra_init_irq, |
565 .init_machine = tegra_seaboard_init, | 605 .init_machine = tegra_seaboard_init, |
566 .map_io = tegra_map_common_io, | 606 .map_io = tegra_map_common_io, |
567 .timer = &tegra_timer, | 607 .timer = &tegra_timer, |
568 MACHINE_END | 608 MACHINE_END |
OLD | NEW |