]> Git Repo - linux.git/blobdiff - drivers/gpio/gpio-wm8994.c
net: dsa: Factor bottom tag receive functions
[linux.git] / drivers / gpio / gpio-wm8994.c
index 68410fda61383214cb5328645fcb71e237bece7c..1e35756ac55b74bd2d53e0575210a9fded1b705a 100644 (file)
@@ -103,19 +103,18 @@ static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
        wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset, WM8994_GPN_LVL, value);
 }
 
-static int wm8994_gpio_set_single_ended(struct gpio_chip *chip,
-                                       unsigned int offset,
-                                       enum single_ended_mode mode)
+static int wm8994_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+                                 unsigned long config)
 {
        struct wm8994_gpio *wm8994_gpio = gpiochip_get_data(chip);
        struct wm8994 *wm8994 = wm8994_gpio->wm8994;
 
-       switch (mode) {
-       case LINE_MODE_OPEN_DRAIN:
+       switch (pinconf_to_config_param(config)) {
+       case PIN_CONFIG_DRIVE_OPEN_DRAIN:
                return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
                                       WM8994_GPN_OP_CFG_MASK,
                                       WM8994_GPN_OP_CFG);
-       case LINE_MODE_PUSH_PULL:
+       case PIN_CONFIG_DRIVE_PUSH_PULL:
                return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
                                       WM8994_GPN_OP_CFG_MASK, 0);
        default:
@@ -257,7 +256,7 @@ static const struct gpio_chip template_chip = {
        .get                    = wm8994_gpio_get,
        .direction_output       = wm8994_gpio_direction_out,
        .set                    = wm8994_gpio_set,
-       .set_single_ended       = wm8994_gpio_set_single_ended,
+       .set_config             = wm8994_gpio_set_config,
        .to_irq                 = wm8994_gpio_to_irq,
        .dbg_show               = wm8994_gpio_dbg_show,
        .can_sleep              = true,
This page took 0.034121 seconds and 4 git commands to generate.