/*
 * Generic GPIO API implementation for x86.
 *
 * Derived from the generic GPIO API for powerpc:
 *
 * Copyright (c) 2007-2008  MontaVista Software, Inc.
 *
 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef _ASM_I386_GPIO_H
#define _ASM_I386_GPIO_H

#ifdef CONFIG_X86_RDC321X
#include <gpio.h>
#else /* CONFIG_X86_RDC321X */

#include <asm-generic/gpio.h>

#ifdef CONFIG_GPIOLIB

/*
 * Just call gpiolib.
 */
static inline int gpio_get_value(unsigned int gpio)
{
	return __gpio_get_value(gpio);
}

static inline void gpio_set_value(unsigned int gpio, int value)
{
	__gpio_set_value(gpio, value);
}

static inline int gpio_cansleep(unsigned int gpio)
{
	return __gpio_cansleep(gpio);
}

/*
 * Not implemented, yet.
 */
static inline int gpio_to_irq(unsigned int gpio)
{
	return -ENOSYS;
}

static inline int irq_to_gpio(unsigned int irq)
{
	return -EINVAL;
}

#endif /* CONFIG_GPIOLIB */

#endif /* CONFIG_X86_RDC321X */

#endif /* _ASM_I386_GPIO_H */
