- 14 8月, 2017 40 次提交
-
-
由 Bhumika Goyal 提交于
Make the structure const as it is only passed to the function devm_regmap_add_irq_chip having the corresponding argument as const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Michal Simek 提交于
Fix function parameters alignment reported by checkpatch. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Nava kishore Manne 提交于
This patch fixes the below warning -->Block comments should align the * on each line. -->suspect code indent for conditional statements. -->Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: NNava kishore Manne <navam@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Michal Simek 提交于
Remove one additional line and add two new. All are reported by checkpatch. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Nava kishore Manne 提交于
This patch fixes the kernel doc warnings in the driver. Signed-off-by: NNava kishore Manne <navam@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Swapna Manupati 提交于
This patch provides workaround in the gpio driver for Zynq and ZynqMP Platforms by reading pin value of EMIO banks through DATA register as it was unable to read the value of it from DATA_RO register. Signed-off-by: NSwapna Manupati <swapnam@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Shubhrajyoti Datta 提交于
Add support for suspend resume. Now that we can lose context across a suspend/ resume cycle. Add support for the context restore. Signed-off-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Rajmohan Mani 提交于
This patch adds support for TPS68470 GPIOs. There are 7 GPIOs and a few sensor related GPIOs. These GPIOs can be requested and configured as appropriate. The GPIOs are also provided with descriptive names. However, the typical use case is that the OS GPIO driver will interact with TPS68470 GPIO driver to configure these GPIOs, as requested by the platform firmware. Signed-off-by: NRajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Keerthy 提交于
Currently davinci_gpio_irq_setup return value is ignored. Handle the return value appropriately. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Keerthy 提交于
The patch adds keystone-k2g compatible, specific properties and an example. The patch also adds the details of supported SoCs for each compatible. Signed-off-by: NKeerthy <j-keerthy@ti.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Dong Aisheng 提交于
The Rapid General-Purpose Input and Output with 2 Ports (RGPIO2P) on MX7ULP is similar to GPIO on Vibrid. But unlike Vibrid, the RGPIO2P has an extra Port Data Direction Register (PDDR) used to configure the individual port pins for input or output. We introduce a bool have_paddr with fsl_gpio_soc_data data to distinguish this differences. And we support getting the output status by checking the GPIO direction in PDDR. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Stefan Agner <stefan@agner.ch> Cc: Fugang Duan <fugang.duan@nxp.com> Cc: Peter Chen <peter.chen@nxp.com> Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Gustavo A. R. Silva 提交于
platform_get_irq() returns an error code, but the gpio-msic driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Notice that platform_get_irq() no longer returns 0 on error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af Print and propagate the return value of platform_get_irq on failure. Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Arvind Yadav 提交于
omap_gpio_probe() can fail here and we must disable clock. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Arvind Yadav 提交于
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Diego Elio Pettenò 提交于
From the datasheet, the GPIO interface is identical to IT8728 (same description), so just add it to the same case as the other chip. Signed-off-by: NDiego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
In most of the cases, integers in this file can't be negative, so the type can be more restricted for clarity. Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Fix a couple of checkpatch warnings, such as complaints about bare unsigned being used (instead of unsigned int) and missing blank lines after declarations. Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Rather than manually compute the size of an array, pass the number and element size to kcalloc(). Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
of_device_get_match_data() can never return NULL, therefore the check for NULL values is unnecessary. Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
The cell count for GPIO specifiers can never be negative, so make the field unsigned. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
This adds a section about the various parts of the GPIO subsystem to the driver API documentation. Note that this isn't exhaustive documentation, but rather focusses on pulling in the kerneldoc from various sources, in order to improve coverage of kerneldoc processing. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Fix up some references to parameters to match the code. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Fix up a parameter description to match the code and fix markup for a constant to prettify output. Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Add missing descriptions for some parameters to match the code. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Add descriptions for missing fields and fix up some parameter references to match the code. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Some kerneldoc has become stale or wasn't quite correct from the outset. Fix up the most serious issues to silence warnings when building the documentation. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Instead of using platform_get_resource() and getting the interrupts from the resource, use platform_get_irq() which is slightly easier to use and covers some special cases that the former doesn't. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Use platform_irq_count() instead of open-coding the same code sequence. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Rob Herring 提交于
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: NRob Herring <robh@kernel.org> Cc: Tien Hock Loh <thloh@altera.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: bcm-kernel-feedback-list@broadcom.com Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: NGregory Fong <gregory.0xf0@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Keerthy 提交于
In case of devm_clk_get failure use dev_err instead of printk Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Keerthy 提交于
Use the devm version of gpiochip_add_data and pass on the return value. This avoids memory leak due to gpiochip_add_data in case the driver is unbound. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Gustavo A. R. Silva 提交于
This structure is only used to copy into another structure, so declare it as const. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct gpio_chip e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct gpio_chip i = { ... }; In the following log you can see a significant difference in the code size and data segment, hence in the dec segment. This log is the output of the size command, before and after the code change: before: text data bss dec hex filename 1954 600 0 2554 9fa drivers/gpio/gpio-altera-a10sr.o after: text data bss dec hex filename 1655 512 0 2167 877 drivers/gpio/gpio-altera-a10sr.o Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Reviewed-by: NThor Thayer <thor.thayer@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Dong Aisheng 提交于
The Rapid General-Purpose Input and Output with 2 Ports (RGPIO2P) on MX7ULP is similar to GPIO on Vibrid, except it has an extra Port Data Direction Register (PDDR) used to configure the individual port pins for input or output. Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Stefan Agner <stefan@agner.ch> Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Philipp Rosenberger 提交于
Errors from enable_irq_wake() in gpio_set_wake_irq() were silently ignored. Thus led to the problem that gpio_set_wake_irq() always returned successfully, even if enable_irq_wake() returned an error. Signed-off-by: NPhilipp Rosenberger <p.rosenberger@linutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Simon Horman 提交于
Add fallback compatibility string for R-Car Gen 1, 2 and 3. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. Gen 1 and 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme being adopted for drivers for Renesas SoCs. Also deprecate renesas,gpio-rcar as its name is more generic than its implementation. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Masahiro Yamada 提交于
In header files, static inline is more commonly used. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Grygorii Strashko 提交于
gpio_to_irq() API expected to be used by GPIO consumers and not drivers and there are no guarantee that its gpiolib implementation is irq safe. Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Grygorii Strashko 提交于
gpio_to_irq() API expected to be used by GPIO consumers and not drivers and there are no guarantee that its gpiolib implementation is irq safe. Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Grygorii Strashko 提交于
Now IRQ mappings are always created for all (allowed) GPIOs in gpiochip in gpiochip_irqchip_add_key() which goes against the idea of SPARSE_IRQ and, as result, leads to: - increasing of memory consumption for IRQ descriptors most of which will never ever be used (espessially on platform with a high number of GPIOs). (sizeof(struct irq_desc) == 256 on my tested platforms) - imposibility to use GPIO irqchip APIs by gpio drivers when HW implements GPIO IRQ functionality as IRQ crossbar/router which has only limited number of IRQ outputs (example from [1], all GPIOs can be mapped on only 8 IRQs). Hence, remove static IRQ mapping code from gpiochip_irqchip_add_key() and instead replace irq_find_mapping() with irq_create_mapping() in gpiochip_to_irq(). Also add additional gpiochip_irqchip_irq_valid() calls in gpiochip_to_irq() and gpiochip_irq_map(). After this change gpio2irq mapping will happen the following way when GPIO irqchip APIs are used by gpio driver: - IRQ mappings will be created statically if driver passes first_irq>0 vlaue in gpiochip_irqchip_add_key(). - IRQ mappings will be created dynamically from gpio_to_irq() or of_irq_get(). Tested on am335x-evm and dra72-evm-revc. - dra72-evm-revc: number of created irq mappings decreased from 402 -> 135 Mem savings 267*256 = 68352 (66kB) - am335x-evm: number of created irq mappings decreased from 188 -> 63 Mem savings 125*256 = 32000 (31kB) [1] https://lkml.org/lkml/2017/6/15/428Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Timur Tabi 提交于
Before querying a GPIO to determine its direction, the GPIO should be formally requested. This allows the GPIO driver to block access to unavailable GPIOs, which makes it easier for some drivers to support sparse GPIO maps. Signed-off-by: NTimur Tabi <timur@codeaurora.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-