Stop using obsolete pxa_gpio_mode, use MFP and GPIO API for setting pin parameters.
Signed-off-by: Dmitry Eremin-Solenikov dbaryshkov@gmail.com Cc: Eric Miao eric.miao@marvell.com Cc: Mark Brown broonie@opensource.wolfsonmicro.com --- arch/arm/mach-pxa/pxa27x.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index a0e787e..8674581 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -355,30 +355,30 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) * computes the correct gpio_mode for further use by reset functions, and * applied the change through pxa_gpio_mode. */ -/* temporary include */ -#include <mach/pxa2xx-gpio.h> void pxa27x_ac97_reset(int reset_gpio, int resetgpio_action) { - int mode = 0; + unsigned long mfp[1] = {0};
if (reset_gpio) switch (resetgpio_action) { case RESETGPIO_NORMAL_ALTFUNC: if (reset_gpio == 113) - mode = 113 | GPIO_ALT_FN_2_OUT; + mfp[0] = GPIO113_AC97_nRESET; if (reset_gpio == 95) - mode = 95 | GPIO_ALT_FN_1_OUT; + mfp[0] = GPIO95_AC97_nRESET; + pxa2xx_mfp_config(mfp, 1); break; case RESETGPIO_FORCE_LOW: - mode = reset_gpio | GPIO_OUT | GPIO_DFLT_LOW; + mfp[0] = MFP_CFG_OUT(GPIO0, AF0, DRIVE_LOW) | MFP_PIN(reset_gpio); + pxa2xx_mfp_config(mfp, 1); + gpio_direction_output(reset_gpio, 0); break; case RESETGPIO_FORCE_HIGH: - mode = reset_gpio | GPIO_OUT | GPIO_DFLT_HIGH; + mfp[0] = MFP_CFG_OUT(GPIO0, AF0, DRIVE_HIGH) | MFP_PIN(reset_gpio); + pxa2xx_mfp_config(mfp, 1); + gpio_direction_output(reset_gpio, 1); break; }; - - if (mode) - pxa_gpio_mode(mode); } EXPORT_SYMBOL(pxa27x_ac97_reset);