]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/gpio/gpio-vx855.c
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / gpio / gpio-vx855.c
index 4e450121129bc12e1066ff90e7f2dd52756cc5ad..98a6f1fcc561a89f07f6cc396584fdd131a9dc79 100644 (file)
@@ -186,23 +186,24 @@ static int vx855gpio_direction_output(struct gpio_chip *gpio,
        return 0;
 }
 
-static int vx855gpio_set_single_ended(struct gpio_chip *gpio,
-                                     unsigned int nr,
-                                     enum single_ended_mode mode)
+static int vx855gpio_set_config(struct gpio_chip *gpio, unsigned int nr,
+                               unsigned long config)
 {
+       enum pin_config_param param = pinconf_to_config_param(config);
+
        /* The GPI cannot be single-ended */
        if (nr < NR_VX855_GPI)
                return -EINVAL;
 
        /* The GPO's are push-pull */
        if (nr < NR_VX855_GPInO) {
-               if (mode != LINE_MODE_PUSH_PULL)
+               if (param != PIN_CONFIG_DRIVE_PUSH_PULL)
                        return -ENOTSUPP;
                return 0;
        }
 
        /* The GPIO's are open drain */
-       if (mode != LINE_MODE_OPEN_DRAIN)
+       if (param != PIN_CONFIG_DRIVE_OPEN_DRAIN)
                return -ENOTSUPP;
 
        return 0;
@@ -231,7 +232,7 @@ static void vx855gpio_gpio_setup(struct vx855_gpio *vg)
        c->direction_output = vx855gpio_direction_output;
        c->get = vx855gpio_get;
        c->set = vx855gpio_set;
-       c->set_single_ended = vx855gpio_set_single_ended;
+       c->set_config = vx855gpio_set_config,
        c->dbg_show = NULL;
        c->base = 0;
        c->ngpio = NR_VX855_GP;