12 #include <linux/module.h>
17 static int ucb1400_gpio_dir_in(
struct gpio_chip *
gc,
unsigned off)
21 ucb1400_gpio_set_direction(gpio->
ac97, off, 0);
25 static int ucb1400_gpio_dir_out(
struct gpio_chip *
gc,
unsigned off,
int val)
29 ucb1400_gpio_set_direction(gpio->
ac97, off, 1);
30 ucb1400_gpio_set_value(gpio->
ac97, off, val);
34 static int ucb1400_gpio_get(
struct gpio_chip *
gc,
unsigned off)
38 return ucb1400_gpio_get_value(gpio->
ac97, off);
41 static void ucb1400_gpio_set(
struct gpio_chip *
gc,
unsigned off,
int val)
45 ucb1400_gpio_set_value(gpio->
ac97, off, val);
58 platform_set_drvdata(dev, ucb);
60 ucb->
gc.label =
"ucb1400_gpio";
65 ucb->
gc.direction_input = ucb1400_gpio_dir_in;
66 ucb->
gc.direction_output = ucb1400_gpio_dir_out;
67 ucb->
gc.get = ucb1400_gpio_get;
68 ucb->
gc.set = ucb1400_gpio_set;
69 ucb->
gc.can_sleep = 1;
99 .probe = ucb1400_gpio_probe,
100 .remove = ucb1400_gpio_remove,
102 .name =
"ucb1400_gpio"