diff options
author | Shaoming Feng <shaomingf@nvidia.com> | 2013-03-19 14:16:04 -0700 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2013-03-21 02:25:57 -0700 |
commit | 89b9319137af0674b7315a431c49ae32df66a31e (patch) | |
tree | 0b49fffbfeee88a50ecc14faa1a2ee5b0d6f4aef | |
parent | d04f676ea17186a7c18def6c2a66576fb5c5ade3 (diff) |
arm: tegra: roth: add tach in p2560 and init GPIO
PWM fan on P2560 uses GPIO_PU2. On reworked P2454 it uses
GPIO_PX4, which GPIO is not used for other purpose.
Change-Id: Iba12f8c6fb9cb8fc5d23f58abb49a2d0f3ceb4d0
Signed-off-by: Shaoming Feng <shaomingf@nvidia.com>
Reviewed-on: http://git-master/r/210913
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matt Wagner <mwagner@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-roth-fan.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-roth-pinmux-t11x.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-roth-pinmux.c | 3 | ||||
-rw-r--r-- | include/linux/platform_data/pwm_fan.h | 1 |
4 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-roth-fan.c b/arch/arm/mach-tegra/board-roth-fan.c index 52c7c81089b5..59cae6652083 100644 --- a/arch/arm/mach-tegra/board-roth-fan.c +++ b/arch/arm/mach-tegra/board-roth-fan.c @@ -41,6 +41,7 @@ static struct pwm_fan_platform_data fan_data = { .step_time = 100, /*msecs*/ .pwm_cap = 158, .precision_multiplier = 1024, + .tach_gpio = TEGRA_GPIO_PX4, }; static struct platform_device pwm_fan_therm_cooling_device = { diff --git a/arch/arm/mach-tegra/board-roth-pinmux-t11x.h b/arch/arm/mach-tegra/board-roth-pinmux-t11x.h index 661e5e420570..64f39e811609 100644 --- a/arch/arm/mach-tegra/board-roth-pinmux-t11x.h +++ b/arch/arm/mach-tegra/board-roth-pinmux-t11x.h @@ -233,7 +233,7 @@ static __initdata struct tegra_pingroup_config unused_pins_lowpower[] = { }; static struct gpio_init_pin_info init_gpio_mode_roth_common[] = { - GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX4, false, 0), + GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX4, true, 1), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX5, true, 0), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX6, true, 0), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PW2, true, 0), @@ -286,7 +286,7 @@ static struct gpio_init_pin_info init_gpio_mode_roth_common[] = { GPIO_INIT_PIN_MODE(TEGRA_GPIO_PEE1, false, 0), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU0, false, 0), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU1, true, 0), - GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU2, true, 0), + GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU2, true, 1), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU4, false, 1), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU5, true, 0), GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU6, true, 0), diff --git a/arch/arm/mach-tegra/board-roth-pinmux.c b/arch/arm/mach-tegra/board-roth-pinmux.c index 0dfc3afb320f..ba3143b75457 100644 --- a/arch/arm/mach-tegra/board-roth-pinmux.c +++ b/arch/arm/mach-tegra/board-roth-pinmux.c @@ -182,7 +182,7 @@ static __initdata struct tegra_drive_pingroup_config roth_drive_pinmux[] = { /* Initially setting all used GPIO's to non-TRISTATE */ static __initdata struct tegra_pingroup_config roth_pinmux_set_nontristate[] = { - DEFAULT_PINMUX(GPIO_X4_AUD, RSVD, PULL_DOWN, NORMAL, OUTPUT), + DEFAULT_PINMUX(GPIO_X4_AUD, RSVD, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_X5_AUD, RSVD, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_X6_AUD, RSVD3, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_X7_AUD, RSVD, PULL_DOWN, NORMAL, OUTPUT), @@ -237,6 +237,7 @@ static __initdata struct tegra_pingroup_config roth_pinmux_set_nontristate[] = { DEFAULT_PINMUX(KB_ROW6, KBC, PULL_DOWN, NORMAL, INPUT), DEFAULT_PINMUX(CLK3_REQ, RSVD3, NORMAL, NORMAL, OUTPUT), + DEFAULT_PINMUX(GPIO_PU2, RSVD, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PU4, RSVD3, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GPIO_PU5, RSVD3, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PU6, RSVD3, NORMAL, NORMAL, INPUT), diff --git a/include/linux/platform_data/pwm_fan.h b/include/linux/platform_data/pwm_fan.h index 8bc5b4e94f16..68f0ecac39ef 100644 --- a/include/linux/platform_data/pwm_fan.h +++ b/include/linux/platform_data/pwm_fan.h @@ -33,5 +33,6 @@ struct pwm_fan_platform_data { int pwm_id; int step_time; int precision_multiplier; + int tach_gpio; }; #endif |