diff options
| author | KV Sujith <sujithkv@ti.com> | 2013-08-18 01:18:58 -0400 |
|---|---|---|
| committer | Sekhar Nori <nsekhar@ti.com> | 2013-09-24 01:01:51 -0400 |
| commit | 118150f22d6b4431a1fe2e715de314a5d93836f5 (patch) | |
| tree | 080754912ca05cd7dc93fd177e435582b5671f1b /include/linux/platform_data | |
| parent | 131a10a39545cce2f569a760e4470ebd988132b0 (diff) | |
gpio: davinci: move to platform device
Modify DaVinci GPIO driver to become a platform device
driver.
The driver does not have platform driver structure or
a probe. Instead, it has pure_initcall function for
initialization. The platform specific informaiton is
obtained using the DaVinci specific davinci_soc_info
structure. This is a problem for Device Tree (DT)
implementation.
As a first stage of DT conversion, we implement a probe.
Additional notes:
- The driver registration happens as postcore_initcall.
This is required since machine init functions like
da850_lcd_hw_init() make use of GPIO.
- Start using devres APIs for simpler error handling.
Signed-off-by: KV Sujith <sujithkv@ti.com>
[avinashphilip@ti.com: Move global definition of
"davinci_gpio_controller" to local]
Signed-off-by: Philip Avinash <avinashphilip@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
[nsekhar@ti.com: drop unused structure member, rebase to new
clean-up patch and fix error messages]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/gpio-davinci.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h new file mode 100644 index 000000000000..2fcc125af1aa --- /dev/null +++ b/include/linux/platform_data/gpio-davinci.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * DaVinci GPIO Platform Related Defines | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License as | ||
| 8 | * published by the Free Software Foundation version 2. | ||
| 9 | * | ||
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 11 | * kind, whether express or implied; without even the implied warranty | ||
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __DAVINCI_GPIO_PLATFORM_H | ||
| 17 | #define __DAVINCI_GPIO_PLATFORM_H | ||
| 18 | |||
| 19 | struct davinci_gpio_platform_data { | ||
| 20 | u32 ngpio; | ||
| 21 | u32 gpio_unbanked; | ||
| 22 | u32 intc_irq_num; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #endif | ||
