summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/gpio-dwapb.h
AgeCommit message (Collapse)Author
2021-08-11gpio: dwapb: Get rid of legacy platform dataAndy Shevchenko
Platform data is a legacy interface to supply device properties to the driver. In this case we don't have anymore in-kernel users for it. Just remove it for good. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Tested-by: Serge Semin <fancer.lancer@gmail.com>
2021-08-11gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs()Andy Shevchenko
Shared IRQ is only enabled for ACPI enumeration, there is no need to have a special flag for that, since we simple can test if device has been enumerated by ACPI. This unifies the checks in dwapb_get_irq() and dwapb_configure_irqs(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Serge Semin <fancer.lancer@gmail.com> Tested-by: Serge Semin <fancer.lancer@gmail.com>
2020-08-27gpio: dwapb: Add max GPIOs macroSerge Semin
Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number of GPIO lines corresponding to the maximum DW APB GPIO controller port width. Use the new macro instead of number literal 32 where it's applicable. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200730152808.2955-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-05-25gpio: dwapb: Remove unneeded has_irq member in struct dwapb_port_propertyAndy Shevchenko
has_irq member of struct dwapb_port_property is used only in one place, so, make it local test instead and remove from the structure. This local test is using memchr_inv() which is quite efficient in comparison to the original loop and possible little overhead can be neglected. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Serge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/20200519131233.59032-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 263 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-28gpio: dwapb: Fix rework support for 1 interrupt per port A GPIOPhil Edworthy
Commit da069d5d2b814d9887989dcdb29fb0202eac8b38 ("gpio: dwapb: Rework support for 1 interrupt per port A GPIO"), was an incremental patch that was supposed to provide the delta between v5 and v6 patch set for adding support for 1 interupt per port A GPIO. v5 was applied, then some other feedback came afterwards. However, in my haste I managed to drop the changes made to dwapb_port_property struct. This patch includes those missing changes. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-16gpio: dwapb: Add support for 1 interrupt per port A GPIOPhil Edworthy
The DesignWare GPIO IP can be configured for either 1 interrupt or 1 per GPIO in port A, but the driver currently only supports 1 interrupt. See the DesignWare DW_apb_gpio Databook description of the 'GPIO_INTR_IO' parameter. This change allows the driver to work with up to 32 interrupts, it will get as many interrupts as specified in the DT 'interrupts' property. It doesn't do anything clever with the different interrupts, it just calls the same handler used for single interrupt hardware. ACPI companion code provided by Hoan Tran <hotran@apm.com>. This was tested on X-Gene by Hoan. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Hoan Tran <hotran@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: dwapb: convert device node to fwnodeJiang Qiu
This patch converts device node to fwnode for dwapb driver, so as to provide a unified fwnode for DT and ACPI bindings. Tested-by: Alan Tull <delicious.quinoa@gmail.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiang Qiu <qiujiang@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: dwapb: remove name from dwapb_port_propertyJiang Qiu
This patch removed the name property from dwapb_port_property. The name property is redundant, since we can get this info from dwapb_gpio dev node. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiang Qiu <qiujiang@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-23GPIO: gpio-dwapb: Enable platform driver binding to MFD driverWeike Chen
The Synopsys DesignWare APB GPIO driver only supports open firmware devices. But, like Intel Quark X1000 SOC, which has a single PCI function exporting a GPIO and an I2C controller, it is a Multifunction device. This patch is to enable the current Synopsys DesignWare APB GPIO driver to support the Multifunction device which exports the designware GPIO controller. Reviewed-by: Hock Leong Kweh <hock.leong.kweh@intel.com> Signed-off-by: Weike Chen <alvin.chen@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>