- 16 1月, 2015 25 次提交
-
-
由 Semen Protsenko 提交于
Signed-off-by: NSemen Protsenko <semen.protsenko@globallogic.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
X86 Kconfig symbol is X86, not ARCH_X86. Fixes: c586b3075d5b47d8 (gpio/xilinx: Add support for X86 Arch) Reported-by: NPaul Bolle <pebolle@tiscali.nl> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Switch the R-Car Gen2 GPIO driver to use the gpiolib irqchip helpers. While doing this also make sure that gpiochip_irqchip_add() is called after the gpiochip itself is registered, as required. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
If the call to devm_kzalloc() fails, nothing must be cleant up. This was missed before because gpio_rcar_probe() had a "return" statement after the first "goto err0". Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Fixes: df0c6c80 ("gpio: rcar: Add minimal runtime PM support") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andrew Lunn 提交于
Ensure that when there is an error during probe that the gpiochip is removed and the generic irq chip is removed. Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andrew Lunn 提交于
Wrap some long lines. Prefer seq_puts() over seq_printf(). space to tab conversions. Spelling error fix. Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Olliver Schinagl 提交于
Checkpatch complains, and probably with good reason that we should use const char const * for the static constant array that never gets changed. Signed-off-by: NOlliver Schinagl <oliver@schinagl.nl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Varka Bhadram 提交于
ioport_map() may fail. Its safe to check the return value. Signed-off-by: NVarka Bhadram <varkab@cdac.in> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
Use resource managed APIs to simplify the code a bit. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
Use resource_size to fix off-by-one resource size calculation Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NJames Hogan <james.hogan@imgtec.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wolfram Sang 提交于
This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
Fix a copy-paste bug. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Dan Carpenter 提交于
"gc->ngpio" is a number between 1 and GRGPIO_MAX_NGPIO. If "offset" is GRGPIO_MAX_NGPIO then we're going one step beyond the end of the priv->lirqs[] array. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
This device is only used from the device tree, and the startup() and remove() callbacks are not used anywhere in the kernel, so retire them and the pdata altogether. Cc: Samuel Ortiz <sameo@linux.intel.com> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
Use devm_* APIs to simplify the code a bit. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Use the newly created of_mm_gpiochip_remove function for cleaning up of_mm_gpiochip_add Suggested-by: NAlexandre Courbot <gnurou@gmail.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Create counterpart of of_mm_gpiochip_add(). This way the modules that can be removable do not duplicate the cleanup code. Suggested-by: NAlexandre Courbot <gnurou@gmail.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Currently, we had two gpio chips on cores configured as dual. This lead to mapping the same memory region twice and duplicating the init and remove code. This patch creates a single gpiochip for single and dual cores. Suggested-by: NAlexandre Courbot <gnurou@gmail.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Some documentation were not following the kernel-doc format. Backporting patch from Xilinx git repository. Suggested-by: NMichal Simek <michal.simek@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Core can be accessed via PCIe on X86 platform. This patch also allows the driver to be used as module. Acked-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
This way we do not need to transverse the device tree manually and we support hot plugged devices. Also Implement remove callback so the driver can be unloaded Acked-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Ricardo Ribalda Delgado 提交于
Instead of calculating the register offset per call, pre-calculate it on probe time. Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Chang Rebecca Swee Fun 提交于
Intel Quark X1000 provides a total of 16 GPIOs. The GPIOs are split between the legacy I/O bridge and the GPIO controller. GPIO-SCH is the GPIO pins on legacy bridge for Intel Quark SoC. Intel Quark X1000 has 2 GPIOs powered by the core power well and 6 from the suspend power well. This piece of work is derived from Dan O'Donovan's initial work for Quark X1000 enabling. Signed-off-by: NChang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wei Chen 提交于
semtech has two series of sx150x gpio expanders: sx150x-456 and sx150x-789. The current gpio-150x driver in linux only support sx1508 and sx1509. We added sx1506 support code into this driver. Signed-off-by: NWei Chen <Wei.Chen@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wei Chen 提交于
The sx150x gpio driver used a loop to set liner irq map for gpio pins. Now we use the irq domain to rebuild this irq mappig and make sure the codes are still compatible to old users. this patch also adds IRQF_ONESHOT flag to fix the IRQ flooding issues. Signed-off-by: NWei Chen <Wei.Chen@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> [Make Kconfig select GPIOLIB_IRQCHIP] Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 09 1月, 2015 1 次提交
-
-
由 Kamlakant Patel 提交于
This patch converts MOXART GPIO driver to use basic_mmio_gpio generic library. Signed-off-by: NKamlakant Patel <kamlakant.patel@linaro.org> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Tested-by: NJonas Jensen <jonas.jensen@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 12 12月, 2014 1 次提交
-
-
由 Linus Walleij 提交于
The driver depends on the chip.of_node being present to compile, which is the case on some target platforms but not others. Instead, rely on chip.dev->of_node to be used, as struct device always has an of_node in place. Cc: Alexander Stein <alexander.stein@systec-electronic.com> Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 04 12月, 2014 2 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM in drivers/gpio/gpio-omap.c. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Acked-by: NJavier Martinez Canillas <javier@dowhile0.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Rafael J. Wysocki 提交于
The SET_PM_RUNTIME_PM_OPS() and SET_RUNTIME_PM_OPS() macros are identical except that one of them is not empty for CONFIG_PM set, while the other one is not empty for CONFIG_PM_RUNTIME set, respectively. However, after commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so one of these macros is now redundant. For this reason, replace SET_PM_RUNTIME_PM_OPS() with SET_RUNTIME_PM_OPS() everywhere and redefine the SET_PM_RUNTIME_PM_OPS symbol as SET_RUNTIME_PM_OPS in case new code is starting to use the macro being removed here. Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NKevin Hilman <khilman@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 03 12月, 2014 2 次提交
-
-
由 Yunlei He 提交于
Gpio-ranges property is useful to represent which GPIOs correspond to which pins on which pin controllers. But there may be some gpios without pinctrl operation. So check whether gpio-ranges property exists in device node first. Signed-off-by: NYunlei He <heyunlei@huawei.com> Signed-off-by: NXinwei Kong <kong.kongxinwei@hisilicon.com> Signed-off-by: NHaojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexander Stein 提交于
Default is active low, but if property is specified in DT set INTPOL flag. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 02 12月, 2014 1 次提交
-
-
由 Alexandre Courbot 提交于
Commit 14e85c0e ("gpio: remove gpio_descs global array") changed gpio_to_desc()'s behavior to return NULL not only for GPIOs numbers not in the valid range, but also for all GPIOs whose controller has not been probed yet. Although this behavior is more correct (nothing hints that these GPIO numbers will be populated later), this affects gpio_request() and gpio_request_one() which call gpiod_request() with a NULL descriptor, causing it to return -EINVAL instead of the expected -EPROBE_DEFER for a non-probed GPIO. gpiod_request() is only called with a descriptor obtained from gpio_to_desc() from these two functions, so address the issue there. Other ways to obtain GPIOs rely on well-defined mappings and can thus return -EPROBE_DEFER only for relevant GPIOs, and are thus not affected by this issue. Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 28 11月, 2014 4 次提交
-
-
由 Alexandre Courbot 提交于
Although gpiod_get_direction() can be considered side-effect free for consumers, its internals involve setting or clearing bits in the affected GPIO descriptor, for which we need to force-cast the const descriptor variable to non-const. This could lead to incorrect behavior if the compiler decides to optimize here, so remove this const attribute. The intent is to make gpiod_get_direction() private anyway, so it does not really matter. Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexandre Courbot 提交于
Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by dynamically-allocated arrays for each GPIO chip. This change makes gpio_to_desc() perform in O(n) (where n is the number of GPIO chips registered) instead of O(1), however since n is rarely bigger than 1 or 2 no noticeable performance issue is expected. Besides this provides more incentive for GPIO consumers to move to the gpiod interface. One could use a O(log(n)) structure to link the GPIO chips together, but considering the low limit of n the hypothetical performance benefit is probably not worth the added complexity. This patch uses kcalloc() in gpiochip_add(), which removes the ability to add a chip before kcalloc() can operate. I am not aware of such cases, but if someone bisects up to this patch then I will be proven wrong... Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Janusz Uzycki 提交于
gpiolib's gpiod_get_direction() function returns the EINVAL error if .get_direction callback is not defined. The patch implements the callback for mxs chip which is useful for debugging. Inspired by arch/arm/mach-at91/gpio.c On the moment the patch is required to get the patch "serial: mxs-auart: enable PPS support" working. It is planned to introduce new mctrl_gpio helpers to avoid gpiod_get_direction() function. Signed-off-by: NJanusz Uzycki <j.uzycki@elproma.com.pl> Acked-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Use dynamic allocation of GPIOs instead of looking at the gpio%u alias in DT. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 27 11月, 2014 4 次提交
-
-
由 Geert Uytterhoeven 提交于
It doesn't make much sense to make some (possible expensive) calls to gpio_is_valid() first, and to ignore the result if the base number is negative. Check for a positive base number first. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexander Stein 提交于
Currently this implementation only supports one IRQ for (all) SPI devices using the same chip select. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexander Stein 提交于
Request a shared interrupt when requesting a mcp23s08 GPIO interrupt. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexander Stein 提交于
If devm_request_threaded_irq fails for some reason we call mcp23s08_irq_teardown afterwards. Do not free the unrequested interrupt in this case. free_irq can also be omitted for the error free case because we use devm_request_threaded_irq. Signed-off-by: NAlexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-