Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808956/?format=api
{ "id": 808956, "url": "http://patchwork.ozlabs.org/api/patches/808956/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170901185736.28051-15-thierry.reding@gmail.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170901185736.28051-15-thierry.reding@gmail.com>", "list_archive_url": null, "date": "2017-09-01T18:57:34", "name": "[14/16] gpio: Add support for banked GPIO controllers", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "60f0a538e8e4ce0a718b3006e20ec956bedcd55a", "submitter": { "id": 26234, "url": "http://patchwork.ozlabs.org/api/people/26234/?format=api", "name": "Thierry Reding", "email": "thierry.reding@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20170901185736.28051-15-thierry.reding@gmail.com/mbox/", "series": [ { "id": 1098, "url": "http://patchwork.ozlabs.org/api/series/1098/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=1098", "date": "2017-09-01T18:57:20", "name": "gpio: Tight IRQ chip integration and banked infrastructure", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1098/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808956/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808956/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-gpio-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"rrSzEnuy\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkT7R3bQsz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Sep 2017 04:59:31 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752664AbdIAS7R (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 1 Sep 2017 14:59:17 -0400", "from mail-wm0-f67.google.com ([74.125.82.67]:33769 \"EHLO\n\tmail-wm0-f67.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752549AbdIAS6F (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Fri, 1 Sep 2017 14:58:05 -0400", "by mail-wm0-f67.google.com with SMTP id 187so742196wmn.0;\n\tFri, 01 Sep 2017 11:58:04 -0700 (PDT)", "from localhost\n\t(p200300E41BD6D60076D02BFFFE273F51.dip0.t-ipconnect.de.\n\t[2003:e4:1bd6:d600:76d0:2bff:fe27:3f51])\n\tby smtp.gmail.com with ESMTPSA id\n\tk18sm708398wmd.19.2017.09.01.11.58.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 01 Sep 2017 11:58:02 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=tSuOz+0X/Nt4eZ9r+H9vcDH+vQ1IsOrt+xO/5ascoCw=;\n\tb=rrSzEnuyHlZjkPmzvX8pCIWuSev0l6/Px4eFP/gz1eKPj/z1YKnpVfr+j/cr+gbGn/\n\tGdQm8ygWNT0rySOoH4NuQoylAM8o77NOLa/O9xLklpP9a2hwhLxJvRsIEU4eVW/HHo+B\n\tHp/PA2eAT/XnO4Oo1HnHrVivYHDrolo2+2v/Rvqv1YbOj1YQZPauz0Bm14BLGy4XffO0\n\tJrhsf/OlXIMqAfd+vy/MaWVzkMOQoK1aN2lNO/4rnxGe6q4buolRek6Ydlt1OCB4rd36\n\tLoEhQKM4LMnm9WyOlaR5B/EtuzZD2AUwQEzpH+akmZcyZiKyLJwG0pXCn5ukHoJI7g8J\n\ton2g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=tSuOz+0X/Nt4eZ9r+H9vcDH+vQ1IsOrt+xO/5ascoCw=;\n\tb=GoigUByGxVgPfotQtHdpmOff2N6aM/J5YaWQAW5KG17O+Xq1rZ/nD/YJcTVNXM9usJ\n\t9kBBJRJ4yvG5x6bEdDG79vJHSudEXsIabY36V311s/wFSTYTiNH9j1cZdKhwdjRWlxUs\n\tWKtIz4+JHLh3uWicfSo0AlDTAI/WQ1XM5sB/gtNk+++bd5YEXJwtQKnWCq1mwgPVYXjQ\n\twVGJ1DhfDhWySPn2qk17V+LYtyPNFv97k8362tpNwKteJtnUEhIuNf95cCoshCnFipqs\n\to3Jsh8CbwXNpz9H+X2BKlz5/rlLgF+r4tfA/KAD/RUTqtY43SnM2l6/Wu3KInMNnE7Zo\n\tRxFA==", "X-Gm-Message-State": "AHPjjUjPCtPrg8lOg3A6EaQ77KmSFTztrZH7oNUdR91Wl+VVPRgJ9Lkw\n\tOv6Ly0rUi58du739", "X-Google-Smtp-Source": "ADKCNb5G2u5Mj/PNvFEcxwvpybuskWTmXxaLXMo/ISFIR7X+3516YbKK4N6Q+OVtKvmXobYTJSWF7g==", "X-Received": "by 10.28.31.214 with SMTP id f205mr1144194wmf.139.1504292283892; \n\tFri, 01 Sep 2017 11:58:03 -0700 (PDT)", "From": "Thierry Reding <thierry.reding@gmail.com>", "To": "Linus Walleij <linus.walleij@linaro.org>", "Cc": "Jonathan Hunter <jonathanh@nvidia.com>, linux-gpio@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org", "Subject": "[PATCH 14/16] gpio: Add support for banked GPIO controllers", "Date": "Fri, 1 Sep 2017 20:57:34 +0200", "Message-Id": "<20170901185736.28051-15-thierry.reding@gmail.com>", "X-Mailer": "git-send-email 2.13.3", "In-Reply-To": "<20170901185736.28051-1-thierry.reding@gmail.com>", "References": "<20170901185736.28051-1-thierry.reding@gmail.com>", "Sender": "linux-gpio-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-gpio.vger.kernel.org>", "X-Mailing-List": "linux-gpio@vger.kernel.org" }, "content": "From: Thierry Reding <treding@nvidia.com>\n\nSome GPIO controllers are subdivided into multiple logical blocks called\nbanks (or ports). This is often caused by the design assigning separate\nresources, such as register regions or interrupts, to each bank, or some\nset of banks.\n\nThis commit adds support for describing controllers that have such a\nbanked design and provides common code for dealing with them.\n\nSigned-off-by: Thierry Reding <treding@nvidia.com>\n---\n drivers/gpio/gpiolib-of.c | 101 +++++++++++++++++++++++++++++++++++++++++\n drivers/gpio/gpiolib.c | 98 ++++++++++++++++++++++++++++++++++++++++\n include/linux/gpio/driver.h | 108 ++++++++++++++++++++++++++++++++++++++++++++\n include/linux/of_gpio.h | 10 ++++\n 4 files changed, 317 insertions(+)", "diff": "diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c\nindex bfcd20699ec8..8b89f03076c2 100644\n--- a/drivers/gpio/gpiolib-of.c\n+++ b/drivers/gpio/gpiolib-of.c\n@@ -310,6 +310,107 @@ int of_gpio_simple_xlate(struct gpio_chip *gc,\n EXPORT_SYMBOL(of_gpio_simple_xlate);\n \n /**\n+ * gpio_banked_irq_domain_xlate - decode an IRQ specifier for banked chips\n+ * @domain: IRQ domain\n+ * @np: device tree node\n+ * @spec: IRQ specifier\n+ * @size: number of cells in IRQ specifier\n+ * @hwirq: return location for the hardware IRQ number\n+ * @type: return location for the IRQ type\n+ *\n+ * Translates the IRQ specifier found in device tree into a hardware IRQ\n+ * number and an interrupt type.\n+ *\n+ * Returns:\n+ * 0 on success or a negative error code on failure.\n+ */\n+int gpio_banked_irq_domain_xlate(struct irq_domain *domain,\n+\t\t\t\t struct device_node *np,\n+\t\t\t\t const u32 *spec, unsigned int size,\n+\t\t\t\t unsigned long *hwirq,\n+\t\t\t\t unsigned int *type)\n+{\n+\tstruct gpio_chip *gc = domain->host_data;\n+\tunsigned int bank, pin, i, offset = 0;\n+\n+\tif (size < 2)\n+\t\treturn -EINVAL;\n+\n+\tbank = (spec[0] >> gc->of_gpio_bank_mask) & gc->of_gpio_bank_shift;\n+\tpin = (spec[0] >> gc->of_gpio_pin_mask) & gc->of_gpio_pin_shift;\n+\n+\tif (bank >= gc->num_banks) {\n+\t\tdev_err(gc->parent, \"invalid bank number: %u\\n\", bank);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (pin >= gc->banks[bank]->num_pins) {\n+\t\tdev_err(gc->parent, \"invalid pin number: %u\\n\", pin);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < bank; i++)\n+\t\toffset += gc->banks[i]->num_pins;\n+\n+\t*type = spec[1] & IRQ_TYPE_SENSE_MASK;\n+\t*hwirq = offset + pin;\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(gpio_banked_irq_domain_xlate);\n+\n+/**\n+ * of_gpio_banked_xlate - translate GPIO specifier to a GPIO number and flags\n+ * @gc: GPIO chip\n+ * @gpiospec: GPIO specifier\n+ * @flags: return location for flags parsed from the GPIO specifier\n+ *\n+ * This translation function takes into account multiple banks that can make\n+ * up a single controller. Each bank can contain one or more pins. A single\n+ * cell in the specifier is used to represent a (bank, pin) pair, with each\n+ * encoded in different fields. The &gpio_chip.of_gpio_bank_shift and\n+ * &gpio_chip.of_gpio_bank_mask fields, and &gpio_chip.of_gpio_pin_shift and\n+ * &gpio_chip.of_gpio_pin_mask are used to specify the encoding.\n+ *\n+ * Returns:\n+ * The chip-relative index of the pin given by the GPIO specifier.\n+ */\n+int of_gpio_banked_xlate(struct gpio_chip *gc,\n+\t\t\t const struct of_phandle_args *gpiospec, u32 *flags)\n+{\n+\tunsigned int offset = 0, bank, pin, i;\n+\tconst u32 *spec = gpiospec->args;\n+\n+\tif (WARN_ON(gc->of_gpio_n_cells < 2))\n+\t\treturn -EINVAL;\n+\n+\tif (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells))\n+\t\treturn -EINVAL;\n+\n+\tbank = (spec[0] >> gc->of_gpio_bank_shift) & gc->of_gpio_bank_mask;\n+\tpin = (spec[0] >> gc->of_gpio_pin_shift) & gc->of_gpio_pin_mask;\n+\n+\tif (bank >= gc->num_banks) {\n+\t\tdev_err(gc->parent, \"invalid bank number: %u\\n\", bank);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (pin >= gc->banks[bank]->num_pins) {\n+\t\tdev_err(gc->parent, \"invalid pin number: %u\\n\", pin);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < bank; i++)\n+\t\toffset += gc->banks[i]->num_pins;\n+\n+\tif (flags)\n+\t\t*flags = spec[1];\n+\n+\treturn offset + pin;\n+}\n+EXPORT_SYMBOL(of_gpio_banked_xlate);\n+\n+/**\n * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank)\n * @np:\t\tdevice node of the GPIO chip\n * @mm_gc:\tpointer to the of_mm_gpio_chip allocated structure\ndiff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c\nindex 7a16dd37bd3d..306c3a13e814 100644\n--- a/drivers/gpio/gpiolib.c\n+++ b/drivers/gpio/gpiolib.c\n@@ -1776,6 +1776,57 @@ static int gpiochip_add_irqchip(struct gpio_chip *gpiochip)\n \tgpiochip->to_irq = gpiochip_to_irq;\n \tgpiochip->irq.default_type = type;\n \n+\tif (gpiochip->num_banks > 0 && !gpiochip->irq.map) {\n+\t\tstruct gpio_irq_chip *irq = &gpiochip->irq;\n+\t\tunsigned int i, j, offset = 0;\n+\n+\t\tif (!irq->parents) {\n+\t\t\tchip_err(gpiochip, \"no parent interrupts defined\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tirq->map = devm_kcalloc(gpiochip->parent, gpiochip->ngpio,\n+\t\t\t\t\tsizeof(*irq->map), GFP_KERNEL);\n+\t\tif (!irq->map)\n+\t\t\treturn -ENOMEM;\n+\n+\t\tfor (i = 0; i < gpiochip->num_banks; i++) {\n+\t\t\tstruct gpio_bank *bank = gpiochip->banks[i];\n+\t\t\tunsigned int parent = bank->parent_irq;\n+\n+\t\t\tfor (j = 0; j < bank->num_pins; j++) {\n+\t\t\t\tif (parent >= irq->num_parents) {\n+\t\t\t\t\tchip_err(gpiochip,\n+\t\t\t\t\t\t \"invalid parent interrupt: %u\\n\",\n+\t\t\t\t\t\t parent);\n+\t\t\t\t\treturn -EINVAL;\n+\t\t\t\t}\n+\n+\t\t\t\tirq->map[offset + j] = irq->parents[parent];\n+\t\t\t}\n+\n+\t\t\toffset += bank->num_pins;\n+\t\t}\n+\t}\n+\n+\tif (gpiochip->num_banks > 0) {\n+\t\tunsigned int i;\n+\n+\t\tfor (i = 0; i < gpiochip->num_banks; i++) {\n+\t\t\tstruct gpio_bank *bank = gpiochip->banks[i];\n+\t\t\tunsigned int num_pins = bank->num_pins;\n+\n+\t\t\tbank->pending = devm_kcalloc(gpiochip->parent,\n+\t\t\t\t\t\t BITS_TO_LONGS(num_pins),\n+\t\t\t\t\t\t sizeof(unsigned long),\n+\t\t\t\t\t\t GFP_KERNEL);\n+\t\t\tif (!bank->pending)\n+\t\t\t\treturn -ENOMEM;\n+\n+\t\t\tbank->chip = gpiochip;\n+\t\t}\n+\t}\n+\n \tif (gpiochip->irq.domain_ops)\n \t\tops = gpiochip->irq.domain_ops;\n \telse\n@@ -1984,6 +2035,53 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,\n }\n EXPORT_SYMBOL_GPL(gpiochip_irqchip_add_key);\n \n+/**\n+ * gpio_irq_chip_banked_handler - interrupt handler for banked IRQ chips\n+ * @desc: IRQ descriptor\n+ *\n+ * Drivers can use this interrupt handler for banked GPIO controllers. This\n+ * implementation iterates over all banks and handles pending interrupts of\n+ * the pins associated with the bank.\n+ *\n+ * This function uses driver specific parts, split out into the\n+ * &gpio_chip.update_bank() callback, to retrieves the interrupt pending\n+ * state for each of the GPIOs exposed by the given bank.\n+ */\n+void gpio_irq_chip_banked_handler(struct irq_desc *desc)\n+{\n+\tstruct gpio_chip *gpio = irq_desc_get_handler_data(desc);\n+\tstruct irq_chip *irq = irq_desc_get_chip(desc);\n+\tunsigned int parent = irq_desc_get_irq(desc);\n+\tstruct gpio_irq_chip *chip = &gpio->irq;\n+\tunsigned int i, offset = 0;\n+\n+\tchained_irq_enter(irq, desc);\n+\n+\tfor (i = 0; i < gpio->num_banks; i++) {\n+\t\tstruct gpio_bank *bank = gpio->banks[i];\n+\t\tunsigned int pin, virq;\n+\n+\t\tif (parent != chip->parents[bank->parent_irq])\n+\t\t\tgoto skip;\n+\n+\t\tchip->update_bank(bank);\n+\n+\t\tfor_each_set_bit(pin, bank->pending, bank->num_pins) {\n+\t\t\tvirq = irq_find_mapping(chip->domain, offset + pin);\n+\t\t\tif (WARN_ON(virq == 0))\n+\t\t\t\tcontinue;\n+\n+\t\t\tgeneric_handle_irq(virq);\n+\t\t}\n+\n+skip:\n+\t\toffset += bank->num_pins;\n+\t}\n+\n+\tchained_irq_exit(irq, desc);\n+}\n+EXPORT_SYMBOL_GPL(gpio_irq_chip_banked_handler);\n+\n #else /* CONFIG_GPIOLIB_IRQCHIP */\n \n static inline int gpiochip_add_irqchip(struct gpio_chip *gpiochip)\ndiff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h\nindex c453e0716228..ecbeb50f8801 100644\n--- a/include/linux/gpio/driver.h\n+++ b/include/linux/gpio/driver.h\n@@ -19,6 +19,47 @@ struct module;\n \n #ifdef CONFIG_GPIOLIB\n \n+/**\n+ * struct gpio_bank - GPIO bank\n+ *\n+ * A GPIO bank, sometimes also referred to as port, represents a subset of the\n+ * pins of a GPIO controller. The separation into banks is often caused by the\n+ * sharing of one or more resource (register region, interrupt, ...) for each\n+ * of the pins in the bank.\n+ *\n+ * In many cases the banking is transparent, but when it is not, GPIO drivers\n+ * can use this code, along with some supporting fields in &struct gpio_chip.\n+ */\n+struct gpio_bank {\n+\t/**\n+\t * @chip:\n+\t *\n+\t * A pointer to the &struct gpio_chip that this bank belongs to.\n+\t */\n+\tstruct gpio_chip *chip;\n+\n+\t/**\n+\t * @parent_irq:\n+\t *\n+\t * The interrupt parent for this bank.\n+\t */\n+\tunsigned int parent_irq;\n+\n+\t/**\n+\t * @num_pins:\n+\t *\n+\t * The number of pins provided by this bank.\n+\t */\n+\tunsigned int num_pins;\n+\n+\t/**\n+\t * @pending:\n+\t *\n+\t * Current interrupt state of each pin in the bank.\n+\t */\n+\tunsigned long *pending;\n+};\n+\n #ifdef CONFIG_GPIOLIB_IRQCHIP\n /**\n * struct gpio_irq_chip - GPIO interrupt controller\n@@ -136,6 +177,15 @@ struct gpio_irq_chip {\n \t * in IRQ domain of the chip.\n \t */\n \tunsigned long *valid_mask;\n+\n+\t/**\n+\t * @update_bank:\n+\t *\n+\t * Callback used by banked interrupt controllers. The driver updates\n+\t * the &gpio_bank.pending field of the given @bank with the current\n+\t * status for each of the GPIOs that it provides.\n+\t */\n+\tvoid (*update_bank)(struct gpio_bank *bank);\n };\n \n static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip)\n@@ -281,6 +331,24 @@ struct gpio_chip {\n \tstruct gpio_irq_chip irq;\n #endif\n \n+\t/**\n+\t * @banks:\n+\t *\n+\t * If a GPIO controller is subdivided into multiple banks, the driver\n+\t * can use this field to store information about these banks.\n+\t *\n+\t * Note that the driver owns this field and the core will not modify\n+\t * it, only reference it.\n+\t */\n+\tstruct gpio_bank **banks;\n+\n+\t/**\n+\t * @num_banks:\n+\t *\n+\t * The number of banks described in @banks.\n+\t */\n+\tunsigned int num_banks;\n+\n #if defined(CONFIG_OF_GPIO)\n \t/*\n \t * If CONFIG_OF is enabled, then all GPIO controllers described in the\n@@ -302,6 +370,38 @@ struct gpio_chip {\n \tunsigned int of_gpio_n_cells;\n \n \t/**\n+\t * @of_gpio_bank_shift:\n+\t *\n+\t * The offset of the field in the cell denoting the bank number of a\n+\t * specified GPIO.\n+\t */\n+\tunsigned int of_gpio_bank_shift;\n+\n+\t/**\n+\t * @of_gpio_bank_mask:\n+\t *\n+\t * The mask of the field in the cell denoting the bank number of a\n+\t * specified GPIO.\n+\t */\n+\tunsigned int of_gpio_bank_mask;\n+\n+\t/**\n+\t * @of_gpio_pin_shift:\n+\t *\n+\t * The offset of the field in the cell denoting the pin number of a\n+\t * specified GPIO within its bank.\n+\t */\n+\tunsigned int of_gpio_pin_shift;\n+\n+\t/**\n+\t * @of_gpio_pin_mask:\n+\t *\n+\t * The mask of the field in the cell denoting the pin number of a\n+\t * specified GPIO within its bank.\n+\t */\n+\tunsigned int of_gpio_pin_mask;\n+\n+\t/**\n \t * @of_xlate:\n \t *\n \t * Callback to translate a device tree GPIO specifier into a chip-\n@@ -374,6 +474,12 @@ int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,\n \t\t irq_hw_number_t hwirq);\n void gpiochip_irq_unmap(struct irq_domain *d, unsigned int irq);\n \n+int gpio_banked_irq_domain_xlate(struct irq_domain *domain,\n+\t\t\t\t struct device_node *np,\n+\t\t\t\t const u32 *spec, unsigned int size,\n+\t\t\t\t unsigned long *hwirq,\n+\t\t\t\t unsigned int *type);\n+\n void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,\n \t\tstruct irq_chip *irqchip,\n \t\tunsigned int parent_irq,\n@@ -391,6 +497,8 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,\n \t\t\t bool nested,\n \t\t\t struct lock_class_key *lock_key);\n \n+void gpio_irq_chip_banked_handler(struct irq_desc *desc);\n+\n #ifdef CONFIG_LOCKDEP\n \n /*\ndiff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h\nindex ca10f43564de..f85414dc31f4 100644\n--- a/include/linux/of_gpio.h\n+++ b/include/linux/of_gpio.h\n@@ -66,6 +66,9 @@ extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);\n extern int of_gpio_simple_xlate(struct gpio_chip *gc,\n \t\t\t\tconst struct of_phandle_args *gpiospec,\n \t\t\t\tu32 *flags);\n+extern int of_gpio_banked_xlate(struct gpio_chip *gc,\n+\t\t\t\tconst struct of_phandle_args *gpiospec,\n+\t\t\t\tu32 *flags);\n \n #else /* CONFIG_OF_GPIO */\n \n@@ -86,6 +89,13 @@ static inline int of_gpio_simple_xlate(struct gpio_chip *gc,\n \treturn -ENOSYS;\n }\n \n+static inline int of_gpio_banked_xlate(struct gpio_chip *gc,\n+\t\t\t\t const struct of_phandle_args *gpiospec,\n+\t\t\t\t u32 *flags)\n+{\n+\treturn -ENOSYS;\n+}\n+\n #endif /* CONFIG_OF_GPIO */\n \n /**\n", "prefixes": [ "14/16" ] }