diff options
author | Philip Avinash <avinashphilip@ti.com> | 2013-08-18 01:18:57 -0400 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2013-09-24 00:52:36 -0400 |
commit | 131a10a39545cce2f569a760e4470ebd988132b0 (patch) | |
tree | ad1c292ffbf88eadfab4c2fd0399540bf510e273 /drivers/gpio/gpio-davinci.c | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
gpio: davinci: coding style correction
Make some minor coding style fixes. Use proper multi-line
commenting style, and use a macro for register offset.
Signed-off-by: Philip Avinash <avinashphilip@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
[nsekhar@ti.com: drop changes which are considered
unnecessary churn - line break fixes
variable name changes and include file
reordering]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-davinci.c')
-rw-r--r-- | drivers/gpio/gpio-davinci.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 17df6db5dca7..cb947a1266ae 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c | |||
@@ -31,6 +31,8 @@ struct davinci_gpio_regs { | |||
31 | u32 intstat; | 31 | u32 intstat; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | #define BINTEN 0x8 /* GPIO Interrupt Per-Bank Enable Register */ | ||
35 | |||
34 | #define chip2controller(chip) \ | 36 | #define chip2controller(chip) \ |
35 | container_of(chip, struct davinci_gpio_controller, chip) | 37 | container_of(chip, struct davinci_gpio_controller, chip) |
36 | 38 | ||
@@ -304,7 +306,8 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset) | |||
304 | { | 306 | { |
305 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 307 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
306 | 308 | ||
307 | /* NOTE: we assume for now that only irqs in the first gpio_chip | 309 | /* |
310 | * NOTE: we assume for now that only irqs in the first gpio_chip | ||
308 | * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs). | 311 | * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs). |
309 | */ | 312 | */ |
310 | if (offset < soc_info->gpio_unbanked) | 313 | if (offset < soc_info->gpio_unbanked) |
@@ -368,7 +371,8 @@ static int __init davinci_gpio_irq_setup(void) | |||
368 | } | 371 | } |
369 | clk_prepare_enable(clk); | 372 | clk_prepare_enable(clk); |
370 | 373 | ||
371 | /* Arrange gpio_to_irq() support, handling either direct IRQs or | 374 | /* |
375 | * Arrange gpio_to_irq() support, handling either direct IRQs or | ||
372 | * banked IRQs. Having GPIOs in the first GPIO bank use direct | 376 | * banked IRQs. Having GPIOs in the first GPIO bank use direct |
373 | * IRQs, while the others use banked IRQs, would need some setup | 377 | * IRQs, while the others use banked IRQs, would need some setup |
374 | * tweaks to recognize hardware which can do that. | 378 | * tweaks to recognize hardware which can do that. |
@@ -450,10 +454,11 @@ static int __init davinci_gpio_irq_setup(void) | |||
450 | } | 454 | } |
451 | 455 | ||
452 | done: | 456 | done: |
453 | /* BINTEN -- per-bank interrupt enable. genirq would also let these | 457 | /* |
458 | * BINTEN -- per-bank interrupt enable. genirq would also let these | ||
454 | * bits be set/cleared dynamically. | 459 | * bits be set/cleared dynamically. |
455 | */ | 460 | */ |
456 | __raw_writel(binten, gpio_base + 0x08); | 461 | __raw_writel(binten, gpio_base + BINTEN); |
457 | 462 | ||
458 | printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0)); | 463 | printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0)); |
459 | 464 | ||