2008-10-20 07:51:03 +08:00
|
|
|
/*
|
2012-08-29 23:16:55 +08:00
|
|
|
* arch/arm/plat-orion/include/plat/orion-gpio.h
|
2008-10-20 07:51:03 +08:00
|
|
|
*
|
|
|
|
* Marvell Orion SoC GPIO handling.
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PLAT_GPIO_H
|
|
|
|
#define __PLAT_GPIO_H
|
|
|
|
|
2009-08-18 17:34:10 +08:00
|
|
|
#include <linux/init.h>
|
2011-08-24 07:43:16 +08:00
|
|
|
#include <linux/types.h>
|
2012-06-27 19:40:04 +08:00
|
|
|
#include <linux/irqdomain.h>
|
2014-10-31 19:40:58 +08:00
|
|
|
|
|
|
|
struct gpio_desc;
|
|
|
|
|
2008-10-20 07:51:03 +08:00
|
|
|
/*
|
|
|
|
* Orion-specific GPIO API extensions.
|
|
|
|
*/
|
|
|
|
void orion_gpio_set_unused(unsigned pin);
|
|
|
|
void orion_gpio_set_blink(unsigned pin, int blink);
|
2014-10-31 19:40:58 +08:00
|
|
|
int orion_gpio_led_blink_set(struct gpio_desc *desc, int state,
|
2012-04-19 05:16:40 +08:00
|
|
|
unsigned long *delay_on, unsigned long *delay_off);
|
2008-10-20 07:51:03 +08:00
|
|
|
|
2009-05-29 08:08:55 +08:00
|
|
|
#define GPIO_INPUT_OK (1 << 0)
|
|
|
|
#define GPIO_OUTPUT_OK (1 << 1)
|
2009-02-03 04:27:55 +08:00
|
|
|
void orion_gpio_set_valid(unsigned pin, int mode);
|
|
|
|
|
2009-05-29 08:08:55 +08:00
|
|
|
/* Initialize gpiolib. */
|
2012-06-27 19:40:04 +08:00
|
|
|
void __init orion_gpio_init(struct device_node *np,
|
|
|
|
int gpio_base, int ngpio,
|
|
|
|
void __iomem *base, int mask_offset,
|
|
|
|
int secondary_irq_base,
|
|
|
|
int irq[4]);
|
2008-10-20 07:51:03 +08:00
|
|
|
|
|
|
|
#endif
|