blob: e763988b04b9cbd216d22e74a8854b598719b257 [file] [log] [blame]
Lennert Buytenhek9569dae2008-10-20 01:51:03 +02001/*
Rob Herringce915742012-08-29 10:16:55 -05002 * arch/arm/plat-orion/include/plat/orion-gpio.h
Lennert Buytenhek9569dae2008-10-20 01:51:03 +02003 *
4 * Marvell Orion SoC GPIO handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __PLAT_GPIO_H
12#define __PLAT_GPIO_H
13
Martin Michlmayr3e475f52009-08-17 23:34:10 -100014#include <linux/init.h>
Axel Lin058b96d2011-08-24 00:43:16 +010015#include <linux/types.h>
Andrew Lunn278b45b2012-06-27 13:40:04 +020016#include <linux/irqdomain.h>
Lennert Buytenhek9569dae2008-10-20 01:51:03 +020017/*
Lennert Buytenhek9569dae2008-10-20 01:51:03 +020018 * Orion-specific GPIO API extensions.
19 */
20void orion_gpio_set_unused(unsigned pin);
Lennert Buytenhek9569dae2008-10-20 01:51:03 +020021void orion_gpio_set_blink(unsigned pin, int blink);
Arnaud Patard (Rtp)ff3e6602012-04-18 23:16:40 +020022int orion_gpio_led_blink_set(unsigned gpio, int state,
23 unsigned long *delay_on, unsigned long *delay_off);
Lennert Buytenhek9569dae2008-10-20 01:51:03 +020024
Erik Benadaa8865652009-05-28 17:08:55 -070025#define GPIO_INPUT_OK (1 << 0)
26#define GPIO_OUTPUT_OK (1 << 1)
Nicolas Pitre28d27cf2009-02-02 15:27:55 -050027void orion_gpio_set_valid(unsigned pin, int mode);
28
Erik Benadaa8865652009-05-28 17:08:55 -070029/* Initialize gpiolib. */
Andrew Lunn278b45b2012-06-27 13:40:04 +020030void __init orion_gpio_init(struct device_node *np,
31 int gpio_base, int ngpio,
32 void __iomem *base, int mask_offset,
33 int secondary_irq_base,
34 int irq[4]);
Erik Benadaa8865652009-05-28 17:08:55 -070035
Lennert Buytenhek9569dae2008-10-20 01:51:03 +020036#endif