Skip to content

Commit

Permalink
sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
Browse files Browse the repository at this point in the history
IRQ modes are not presently supported, so stub in dummy definitions
for now (taken from linux/gpio.h).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Oct 21, 2008
1 parent bbc9741 commit 5501093
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arch/sh/include/asm/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef __ASM_SH_GPIO_H
#define __ASM_SH_GPIO_H

#include <linux/errno.h>

#if defined(CONFIG_CPU_SH3)
#include <cpu/gpio.h>
#endif
Expand Down Expand Up @@ -100,6 +102,19 @@ int gpio_direction_output(unsigned gpio, int value);
int gpio_get_value(unsigned gpio);
void gpio_set_value(unsigned gpio, int value);

/* IRQ modes are unspported */
static inline int gpio_to_irq(unsigned gpio)
{
WARN_ON(1);
return -EINVAL;
}

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

#include <asm-generic/gpio.h>

#endif /* __ASM_SH_GPIO_H */

0 comments on commit 5501093

Please sign in to comment.