gpio-wm8994.c (7483d45f0aee3afc0646d185cabd4af9f6cab58c) gpio-wm8994.c (8cd578b6e28693f357867a77598a88ef3deb6b39)
1/*
2 * gpiolib support for Wolfson WM8994
3 *
4 * Copyright 2009 Wolfson Microelectronics PLC.
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it

--- 75 unchanged lines hidden (view full) ---

84}
85
86static int wm8994_gpio_direction_out(struct gpio_chip *chip,
87 unsigned offset, int value)
88{
89 struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
90 struct wm8994 *wm8994 = wm8994_gpio->wm8994;
91
1/*
2 * gpiolib support for Wolfson WM8994
3 *
4 * Copyright 2009 Wolfson Microelectronics PLC.
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it

--- 75 unchanged lines hidden (view full) ---

84}
85
86static int wm8994_gpio_direction_out(struct gpio_chip *chip,
87 unsigned offset, int value)
88{
89 struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
90 struct wm8994 *wm8994 = wm8994_gpio->wm8994;
91
92 if (value)
93 value = WM8994_GPN_LVL;
94
92 return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
95 return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
93 WM8994_GPN_DIR, 0);
96 WM8994_GPN_DIR | WM8994_GPN_LVL, value);
94}
95
96static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
97{
98 struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
99 struct wm8994 *wm8994 = wm8994_gpio->wm8994;
100
101 if (value)

--- 216 unchanged lines hidden ---
97}
98
99static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
100{
101 struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
102 struct wm8994 *wm8994 = wm8994_gpio->wm8994;
103
104 if (value)

--- 216 unchanged lines hidden ---