diff options
Diffstat (limited to 'arch/arm/mach-s5pc100/gpiolib.c')
-rw-r--r-- | arch/arm/mach-s5pc100/gpiolib.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/arch/arm/mach-s5pc100/gpiolib.c b/arch/arm/mach-s5pc100/gpiolib.c index c8e8336a3a12..0fab7f2cd8bf 100644 --- a/arch/arm/mach-s5pc100/gpiolib.c +++ b/arch/arm/mach-s5pc100/gpiolib.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-s5pc1xx/gpiolib.c | 2 | * arch/arm/plat-s5pc100/gpiolib.c |
3 | * | 3 | * |
4 | * Copyright 2009 Samsung Electronics Co | 4 | * Copyright 2009 Samsung Electronics Co |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
6 | * | 6 | * |
7 | * S5PC1XX - GPIOlib support | 7 | * S5PC100 - GPIOlib support |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -61,13 +61,12 @@ | |||
61 | * L3 8 4Bit None | 61 | * L3 8 4Bit None |
62 | */ | 62 | */ |
63 | 63 | ||
64 | #if 0 | 64 | static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset) |
65 | static int s5pc1xx_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset) | ||
66 | { | 65 | { |
67 | return S3C_IRQ_GPIO(chip->base + offset); | 66 | return S3C_IRQ_GPIO(chip->base + offset); |
68 | } | 67 | } |
69 | 68 | ||
70 | static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset) | 69 | static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset) |
71 | { | 70 | { |
72 | int base; | 71 | int base; |
73 | 72 | ||
@@ -85,7 +84,7 @@ static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset) | |||
85 | return IRQ_EINT(24 + offset); | 84 | return IRQ_EINT(24 + offset); |
86 | return -EINVAL; | 85 | return -EINVAL; |
87 | } | 86 | } |
88 | #endif | 87 | |
89 | static struct s3c_gpio_cfg gpio_cfg = { | 88 | static struct s3c_gpio_cfg gpio_cfg = { |
90 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | 89 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, |
91 | .set_pull = s3c_gpio_setpull_updown, | 90 | .set_pull = s3c_gpio_setpull_updown, |
@@ -382,31 +381,30 @@ static struct s3c_gpio_chip s5pc100_gpio_chips[] = { | |||
382 | }; | 381 | }; |
383 | 382 | ||
384 | /* FIXME move from irq-gpio.c */ | 383 | /* FIXME move from irq-gpio.c */ |
385 | extern struct irq_chip s5pc1xx_gpioint; | 384 | extern struct irq_chip s5pc100_gpioint; |
386 | extern void s5pc1xx_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc); | 385 | extern void s5pc100_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc); |
387 | 386 | ||
388 | static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip) | 387 | static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip) |
389 | { | 388 | { |
390 | #if 0 | ||
391 | /* Interrupt */ | 389 | /* Interrupt */ |
392 | if (chip->config == &gpio_cfg) { | 390 | if (chip->config == &gpio_cfg) { |
393 | int i, irq; | 391 | int i, irq; |
394 | 392 | ||
395 | chip->chip.to_irq = s5pc1xx_gpiolib_to_irq; | 393 | chip->chip.to_irq = s5pc100_gpiolib_to_irq; |
396 | 394 | ||
397 | for (i = 0; i < chip->chip.ngpio; i++) { | 395 | for (i = 0; i < chip->chip.ngpio; i++) { |
398 | irq = S3C_IRQ_GPIO_BASE + chip->chip.base + i; | 396 | irq = S3C_IRQ_GPIO_BASE + chip->chip.base + i; |
399 | set_irq_chip(irq, &s5pc1xx_gpioint); | 397 | set_irq_chip(irq, &s5pc100_gpioint); |
400 | set_irq_data(irq, &chip->chip); | 398 | set_irq_data(irq, &chip->chip); |
401 | set_irq_handler(irq, handle_level_irq); | 399 | set_irq_handler(irq, handle_level_irq); |
402 | set_irq_flags(irq, IRQF_VALID); | 400 | set_irq_flags(irq, IRQF_VALID); |
403 | } | 401 | } |
404 | } else if (chip->config == &gpio_cfg_eint) | 402 | } else if (chip->config == &gpio_cfg_eint) { |
405 | chip->chip.to_irq = s5pc1xx_gpiolib_to_eint; | 403 | chip->chip.to_irq = s5pc100_gpiolib_to_eint; |
406 | #endif | 404 | } |
407 | } | 405 | } |
408 | 406 | ||
409 | static __init int s5pc1xx_gpiolib_init(void) | 407 | static __init int s5pc100_gpiolib_init(void) |
410 | { | 408 | { |
411 | struct s3c_gpio_chip *chip; | 409 | struct s3c_gpio_chip *chip; |
412 | int nr_chips; | 410 | int nr_chips; |
@@ -419,10 +417,10 @@ static __init int s5pc1xx_gpiolib_init(void) | |||
419 | 417 | ||
420 | samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips, | 418 | samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips, |
421 | ARRAY_SIZE(s5pc100_gpio_chips)); | 419 | ARRAY_SIZE(s5pc100_gpio_chips)); |
422 | #if 0 | 420 | |
423 | /* Interrupt */ | 421 | /* Interrupt */ |
424 | set_irq_chained_handler(IRQ_GPIOINT, s5pc1xx_irq_gpioint_handler); | 422 | set_irq_chained_handler(IRQ_GPIOINT, s5pc100_irq_gpioint_handler); |
425 | #endif | 423 | |
426 | return 0; | 424 | return 0; |
427 | } | 425 | } |
428 | core_initcall(s5pc1xx_gpiolib_init); | 426 | core_initcall(s5pc100_gpiolib_init); |