/*1* Generic GPIO API implementation for xtensa.2*3* Stolen from x86, which is derived from the generic GPIO API for powerpc:4*5* Copyright (c) 2007-2008 MontaVista Software, Inc.6*7* Author: Anton Vorontsov <[email protected]>8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License as published by11* the Free Software Foundation; either version 2 of the License, or12* (at your option) any later version.13*/1415#ifndef _ASM_XTENSA_GPIO_H16#define _ASM_XTENSA_GPIO_H1718#include <asm-generic/gpio.h>1920#ifdef CONFIG_GPIOLIB2122/*23* Just call gpiolib.24*/25static inline int gpio_get_value(unsigned int gpio)26{27return __gpio_get_value(gpio);28}2930static inline void gpio_set_value(unsigned int gpio, int value)31{32__gpio_set_value(gpio, value);33}3435static inline int gpio_cansleep(unsigned int gpio)36{37return __gpio_cansleep(gpio);38}3940static inline int gpio_to_irq(unsigned int gpio)41{42return __gpio_to_irq(gpio);43}4445/*46* Not implemented, yet.47*/48static inline int irq_to_gpio(unsigned int irq)49{50return -EINVAL;51}5253#endif /* CONFIG_GPIOLIB */5455#endif /* _ASM_XTENSA_GPIO_H */565758