]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/gpio/gpio-pca953x.c
Merge tag 'gpio-v4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[mirror_ubuntu-artful-kernel.git] / drivers / gpio / gpio-pca953x.c
index fe731f09425712b546655d7097a84b7a47a35d68..d5d72d84b719014feaf38bcdd4b39fdbb67c6b61 100644 (file)
@@ -74,6 +74,7 @@ static const struct i2c_device_id pca953x_id[] = {
        { "max7312", 16 | PCA953X_TYPE | PCA_INT, },
        { "max7313", 16 | PCA953X_TYPE | PCA_INT, },
        { "max7315", 8  | PCA953X_TYPE | PCA_INT, },
+       { "max7318", 16 | PCA953X_TYPE | PCA_INT, },
        { "pca6107", 8  | PCA953X_TYPE | PCA_INT, },
        { "tca6408", 8  | PCA953X_TYPE | PCA_INT, },
        { "tca6416", 16 | PCA953X_TYPE | PCA_INT, },
@@ -635,20 +636,20 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
                        return ret;
                }
 
-               ret =  gpiochip_irqchip_add(&chip->gpio_chip,
-                                           &pca953x_irq_chip,
-                                           irq_base,
-                                           handle_simple_irq,
-                                           IRQ_TYPE_NONE);
+               ret =  gpiochip_irqchip_add_nested(&chip->gpio_chip,
+                                                  &pca953x_irq_chip,
+                                                  irq_base,
+                                                  handle_simple_irq,
+                                                  IRQ_TYPE_NONE);
                if (ret) {
                        dev_err(&client->dev,
                                "could not connect irqchip to gpiochip\n");
                        return ret;
                }
 
-               gpiochip_set_chained_irqchip(&chip->gpio_chip,
-                                            &pca953x_irq_chip,
-                                            client->irq, NULL);
+               gpiochip_set_nested_irqchip(&chip->gpio_chip,
+                                           &pca953x_irq_chip,
+                                           client->irq);
        }
 
        return 0;
@@ -907,6 +908,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
        { .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), },
        { .compatible = "maxim,max7313", .data = OF_953X(16, PCA_INT), },
        { .compatible = "maxim,max7315", .data = OF_953X( 8, PCA_INT), },
+       { .compatible = "maxim,max7318", .data = OF_953X(16, PCA_INT), },
 
        { .compatible = "ti,pca6107", .data = OF_953X( 8, PCA_INT), },
        { .compatible = "ti,pca9536", .data = OF_953X( 4, 0), },