KV Sujith | 118150f | 2013-08-18 10:48:58 +0530 | [diff] [blame] | 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 { |
Bartosz Golaszewski | 786a9ab | 2018-11-21 10:35:17 +0100 | [diff] [blame^] | 20 | bool no_auto_base; |
| 21 | u32 base; |
KV Sujith | 118150f | 2013-08-18 10:48:58 +0530 | [diff] [blame] | 22 | u32 ngpio; |
| 23 | u32 gpio_unbanked; |
KV Sujith | 118150f | 2013-08-18 10:48:58 +0530 | [diff] [blame] | 24 | }; |
| 25 | |
Philip Avinash | f1a4c52 | 2013-08-18 10:49:03 +0530 | [diff] [blame] | 26 | /* Convert GPIO signal to GPIO pin number */ |
| 27 | #define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) |
| 28 | |
KV Sujith | 118150f | 2013-08-18 10:48:58 +0530 | [diff] [blame] | 29 | #endif |