diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/gpio/wm8994-gpio.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/gpio/wm8994-gpio.c')
-rw-r--r-- | drivers/gpio/wm8994-gpio.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpio/wm8994-gpio.c b/drivers/gpio/wm8994-gpio.c index 2ac9a16d3daa..c822baacd8fc 100644 --- a/drivers/gpio/wm8994-gpio.c +++ b/drivers/gpio/wm8994-gpio.c | |||
@@ -35,6 +35,29 @@ static inline struct wm8994_gpio *to_wm8994_gpio(struct gpio_chip *chip) | |||
35 | return container_of(chip, struct wm8994_gpio, gpio_chip); | 35 | return container_of(chip, struct wm8994_gpio, gpio_chip); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int wm8994_gpio_request(struct gpio_chip *chip, unsigned offset) | ||
39 | { | ||
40 | struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip); | ||
41 | struct wm8994 *wm8994 = wm8994_gpio->wm8994; | ||
42 | |||
43 | switch (wm8994->type) { | ||
44 | case WM8958: | ||
45 | switch (offset) { | ||
46 | case 1: | ||
47 | case 2: | ||
48 | case 3: | ||
49 | case 4: | ||
50 | case 6: | ||
51 | return -EINVAL; | ||
52 | } | ||
53 | break; | ||
54 | default: | ||
55 | break; | ||
56 | } | ||
57 | |||
58 | return 0; | ||
59 | } | ||
60 | |||
38 | static int wm8994_gpio_direction_in(struct gpio_chip *chip, unsigned offset) | 61 | static int wm8994_gpio_direction_in(struct gpio_chip *chip, unsigned offset) |
39 | { | 62 | { |
40 | struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip); | 63 | struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip); |
@@ -136,10 +159,12 @@ static void wm8994_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
136 | static struct gpio_chip template_chip = { | 159 | static struct gpio_chip template_chip = { |
137 | .label = "wm8994", | 160 | .label = "wm8994", |
138 | .owner = THIS_MODULE, | 161 | .owner = THIS_MODULE, |
162 | .request = wm8994_gpio_request, | ||
139 | .direction_input = wm8994_gpio_direction_in, | 163 | .direction_input = wm8994_gpio_direction_in, |
140 | .get = wm8994_gpio_get, | 164 | .get = wm8994_gpio_get, |
141 | .direction_output = wm8994_gpio_direction_out, | 165 | .direction_output = wm8994_gpio_direction_out, |
142 | .set = wm8994_gpio_set, | 166 | .set = wm8994_gpio_set, |
167 | .to_irq = wm8994_gpio_to_irq, | ||
143 | .dbg_show = wm8994_gpio_dbg_show, | 168 | .dbg_show = wm8994_gpio_dbg_show, |
144 | .can_sleep = 1, | 169 | .can_sleep = 1, |
145 | }; | 170 | }; |