2 * Ralink SoC specific GPIO support
4 * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
11 #ifndef _RAMIPS_GPIO_H
12 #define _RAMIPS_GPIO_H
14 #include <linux/gpio.h>
15 #include <linux/spinlock.h>
17 enum ramips_gpio_reg
{
18 RAMIPS_GPIO_REG_INT
= 0, /* Interrupt status */
23 RAMIPS_GPIO_REG_DIR
, /* Direction, 0:in, 1: out */
24 RAMIPS_GPIO_REG_POL
, /* Polarity, 0: normal, 1: invert */
26 RAMIPS_GPIO_REG_RESET
,
27 RAMIPS_GPIO_REG_TOGGLE
,
31 struct ramips_gpio_chip
{
32 struct gpio_chip chip
;
33 unsigned long map_base
;
34 unsigned long map_size
;
35 u8 regs
[RAMIPS_GPIO_REG_MAX
];
38 void __iomem
*regs_base
;
41 struct ramips_gpio_data
{
42 unsigned int num_chips
;
43 struct ramips_gpio_chip
*chips
;
46 int ramips_gpio_init(struct ramips_gpio_data
*data
);
48 #endif /* _RAMIPS_GPIO_H */
This page took 0.055656 seconds and 5 git commands to generate.