• Home
  • Raw
  • Download

Lines Matching refs:gpio

23 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir)  in gpio_set_dir()  argument
31 1 << gpio); in gpio_set_dir()
35 1 << gpio); in gpio_set_dir()
40 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument
44 1 << gpio); in wm8350_gpio_set_debounce()
47 WM8350_GPIO_DEBOUNCE, 1 << gpio); in wm8350_gpio_set_debounce()
50 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) in gpio_set_func() argument
55 switch (gpio) { in gpio_set_func()
143 static int gpio_set_pull_up(struct wm8350 *wm8350, int gpio, int up) in gpio_set_pull_up() argument
148 1 << gpio); in gpio_set_pull_up()
152 1 << gpio); in gpio_set_pull_up()
155 static int gpio_set_pull_down(struct wm8350 *wm8350, int gpio, int down) in gpio_set_pull_down() argument
160 1 << gpio); in gpio_set_pull_down()
164 1 << gpio); in gpio_set_pull_down()
167 static int gpio_set_polarity(struct wm8350 *wm8350, int gpio, int pol) in gpio_set_polarity() argument
172 1 << gpio); in gpio_set_polarity()
176 1 << gpio); in gpio_set_polarity()
179 static int gpio_set_invert(struct wm8350 *wm8350, int gpio, int invert) in gpio_set_invert() argument
182 return wm8350_set_bits(wm8350, WM8350_GPIO_INT_MODE, 1 << gpio); in gpio_set_invert()
185 WM8350_GPIO_INT_MODE, 1 << gpio); in gpio_set_invert()
188 int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, in wm8350_gpio_config() argument
193 if (gpio_set_pull_up(wm8350, gpio, 0)) in wm8350_gpio_config()
195 if (gpio_set_pull_down(wm8350, gpio, 0)) in wm8350_gpio_config()
198 if (gpio_set_pull_down(wm8350, gpio, 0)) in wm8350_gpio_config()
200 if (gpio_set_pull_up(wm8350, gpio, 1)) in wm8350_gpio_config()
203 if (gpio_set_pull_up(wm8350, gpio, 0)) in wm8350_gpio_config()
205 if (gpio_set_pull_down(wm8350, gpio, 1)) in wm8350_gpio_config()
209 if (gpio_set_invert(wm8350, gpio, invert)) in wm8350_gpio_config()
211 if (gpio_set_polarity(wm8350, gpio, pol)) in wm8350_gpio_config()
213 if (wm8350_gpio_set_debounce(wm8350, gpio, debounce)) in wm8350_gpio_config()
215 if (gpio_set_dir(wm8350, gpio, dir)) in wm8350_gpio_config()
217 return gpio_set_func(wm8350, gpio, func); in wm8350_gpio_config()