diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2009-07-17 12:50:43 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 18:49:39 +0800 |
commit | c4bd01727380ce666aba987b3d7c0e838cb99bbe (patch) | |
tree | 5ee425da3645c1371b154bc47d1ae7ab3c81041b /arch/arm/mach-pxa/eseries.c | |
parent | 2a23ec3679d84ac243add761fa3d3872cf6dcb11 (diff) |
[ARM] pxa: add gpio_pwdown(_inverted) into pxaficp_ir.c
and convert PXA-based devices to gpio_pwdown where possible.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/eseries.c')
-rw-r--r-- | arch/arm/mach-pxa/eseries.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index c60dadf847a6..91417f035069 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -47,44 +47,9 @@ struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { .gpio_pullup_inverted = 1 }; -static void e7xx_irda_transceiver_mode(struct device *dev, int mode) -{ - if (mode & IR_OFF) { - gpio_set_value(GPIO_E7XX_IR_OFF, 1); - pxa2xx_transceiver_mode(dev, mode); - } else { - pxa2xx_transceiver_mode(dev, mode); - gpio_set_value(GPIO_E7XX_IR_OFF, 0); - } -} - -int e7xx_irda_init(void) -{ - int ret; - - ret = gpio_request(GPIO_E7XX_IR_OFF, "IrDA power"); - if (ret) - goto out; - - ret = gpio_direction_output(GPIO_E7XX_IR_OFF, 0); - if (ret) - goto out; - - e7xx_irda_transceiver_mode(NULL, IR_SIRMODE | IR_OFF); -out: - return ret; -} - -static void e7xx_irda_shutdown(struct device *dev) -{ - e7xx_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF); - gpio_free(GPIO_E7XX_IR_OFF); -} - struct pxaficp_platform_data e7xx_ficp_platform_data = { - .transceiver_cap = IR_SIRMODE | IR_OFF, - .transceiver_mode = e7xx_irda_transceiver_mode, - .shutdown = e7xx_irda_shutdown, + .gpio_pwdown = GPIO_E7XX_IR_OFF, + .transceiver_cap = IR_SIRMODE | IR_OFF, }; int eseries_tmio_enable(struct platform_device *dev) |