Path: blob/master/arch/microblaze/include/asm/gpio.h
15125 views
/*1* Generic GPIO API implementation for PowerPC.2*3* Copyright (c) 2007-2008 MontaVista Software, Inc.4*5* Author: Anton Vorontsov <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*/1213#ifndef _ASM_MICROBLAZE_GPIO_H14#define _ASM_MICROBLAZE_GPIO_H1516#include <linux/errno.h>17#include <asm-generic/gpio.h>1819#ifdef CONFIG_GPIOLIB2021/*22* We don't (yet) implement inlined/rapid versions for on-chip gpios.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}4445static inline int irq_to_gpio(unsigned int irq)46{47return -EINVAL;48}4950#endif /* CONFIG_GPIOLIB */5152#endif /* _ASM_MICROBLAZE_GPIO_H */535455