diff options
| author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-11-20 17:24:30 -0500 |
|---|---|---|
| committer | John Crispin <blogic@openwrt.org> | 2012-11-21 15:55:52 -0500 |
| commit | cf0936b06d8e98a157630e99f647e2ff6d29d7ad (patch) | |
| tree | 651457e034e073d236e9b0e64e0008e4ed2e0150 /include/linux | |
| parent | 3e8bb507edfb44dfb8b0e06574826e34a8f6291d (diff) | |
bcma: add GPIO driver
Register a GPIO driver to access the GPIOs provided by the chip.
The GPIOs of the SoC should always start at 0 and the other GPIOs could
start at a random position. There is just one SoC in a system and when
they start at 0 the number is predictable.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4587
Acked-by: Florian Fainelli <florian@openwrt.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 256702663b68..7d662a988d24 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef LINUX_BCMA_DRIVER_CC_H_ | 1 | #ifndef LINUX_BCMA_DRIVER_CC_H_ |
| 2 | #define LINUX_BCMA_DRIVER_CC_H_ | 2 | #define LINUX_BCMA_DRIVER_CC_H_ |
| 3 | 3 | ||
| 4 | #include <linux/gpio.h> | ||
| 5 | |||
| 4 | /** ChipCommon core registers. **/ | 6 | /** ChipCommon core registers. **/ |
| 5 | #define BCMA_CC_ID 0x0000 | 7 | #define BCMA_CC_ID 0x0000 |
| 6 | #define BCMA_CC_ID_ID 0x0000FFFF | 8 | #define BCMA_CC_ID_ID 0x0000FFFF |
| @@ -570,6 +572,9 @@ struct bcma_drv_cc { | |||
| 570 | 572 | ||
| 571 | /* Lock for GPIO register access. */ | 573 | /* Lock for GPIO register access. */ |
| 572 | spinlock_t gpio_lock; | 574 | spinlock_t gpio_lock; |
| 575 | #ifdef CONFIG_BCMA_DRIVER_GPIO | ||
| 576 | struct gpio_chip gpio; | ||
| 577 | #endif | ||
| 573 | }; | 578 | }; |
| 574 | 579 | ||
| 575 | /* Register access */ | 580 | /* Register access */ |
