14 #include <linux/errno.h>
22 static int txx9_gpio_get(
struct gpio_chip *
chip,
unsigned int offset)
27 static void txx9_gpio_set_raw(
unsigned int offset,
int value)
38 static void txx9_gpio_set(
struct gpio_chip *
chip,
unsigned int offset,
43 txx9_gpio_set_raw(offset, value);
45 spin_unlock_irqrestore(&txx9_gpio_lock, flags);
48 static int txx9_gpio_dir_in(
struct gpio_chip *
chip,
unsigned int offset)
55 spin_unlock_irqrestore(&txx9_gpio_lock, flags);
59 static int txx9_gpio_dir_out(
struct gpio_chip *chip,
unsigned int offset,
64 txx9_gpio_set_raw(offset, value);
68 spin_unlock_irqrestore(&txx9_gpio_lock, flags);
72 static struct gpio_chip txx9_gpio_chip = {
75 .direction_input = txx9_gpio_dir_in,
76 .direction_output = txx9_gpio_dir_out,
81 unsigned int base,
unsigned int num)
86 txx9_gpio_chip.base = base;
87 txx9_gpio_chip.ngpio = num;