aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/treo680.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-07-17 06:50:43 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 06:49:39 -0400
commitc4bd01727380ce666aba987b3d7c0e838cb99bbe (patch)
tree5ee425da3645c1371b154bc47d1ae7ab3c81041b /arch/arm/mach-pxa/treo680.c
parent2a23ec3679d84ac243add761fa3d3872cf6dcb11 (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/treo680.c')
-rw-r--r--arch/arm/mach-pxa/treo680.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/arch/arm/mach-pxa/treo680.c b/arch/arm/mach-pxa/treo680.c
index 9a2df64c6599..fe085076fbf2 100644
--- a/arch/arm/mach-pxa/treo680.c
+++ b/arch/arm/mach-pxa/treo680.c
@@ -295,44 +295,9 @@ static struct platform_device treo680_backlight = {
295/****************************************************************************** 295/******************************************************************************
296 * IrDA 296 * IrDA
297 ******************************************************************************/ 297 ******************************************************************************/
298static void treo680_transceiver_mode(struct device *dev, int mode)
299{
300 gpio_set_value(GPIO_NR_TREO680_IR_EN, mode & IR_OFF);
301 pxa2xx_transceiver_mode(dev, mode);
302}
303
304static int treo680_irda_startup(struct device *dev)
305{
306 int err;
307
308 err = gpio_request(GPIO_NR_TREO680_IR_EN, "Ir port disable");
309 if (err)
310 goto err1;
311
312 err = gpio_direction_output(GPIO_NR_TREO680_IR_EN, 1);
313 if (err)
314 goto err2;
315
316 return 0;
317
318err2:
319 dev_err(dev, "treo680_irda: cannot change IR gpio direction\n");
320 gpio_free(GPIO_NR_TREO680_IR_EN);
321err1:
322 dev_err(dev, "treo680_irda: cannot allocate IR gpio\n");
323 return err;
324}
325
326static void treo680_irda_shutdown(struct device *dev)
327{
328 gpio_free(GPIO_NR_TREO680_IR_EN);
329}
330
331static struct pxaficp_platform_data treo680_ficp_info = { 298static struct pxaficp_platform_data treo680_ficp_info = {
332 .transceiver_cap = IR_FIRMODE | IR_SIRMODE | IR_OFF, 299 .gpio_pwdown = GPIO_NR_TREO680_IR_EN,
333 .startup = treo680_irda_startup, 300 .transceiver_cap = IR_SIRMODE | IR_OFF,
334 .shutdown = treo680_irda_shutdown,
335 .transceiver_mode = treo680_transceiver_mode,
336}; 301};
337 302
338/****************************************************************************** 303/******************************************************************************