- 17 8月, 2012 3 次提交
-
-
由 Axel Lin 提交于
gpio_chip.can_sleep is 0, but current code uses mutex in pch_gpio_set pch_gpio_get and pch_gpio_direction_input functions. Thus those functions are not callable from interrupt context. This patch converts mutex into spinlock. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
gpio_chip.can_sleep is 0, but current code uses mutex in ioh_gpio_set, ioh_gpio_get and ioh_gpio_direction_input functions. Thus those functions are not callable from interrupt context. This patch converts mutex into spinlock. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
When dumping a collection of items via seq_file, it is recommended to use the iterator interface. For the gpiolib debugfs interface this can be done to dump each GPIO chip in turn. Note that for gpiolib this is a little cumbersome because it does not provide a list of registered GPIO chips and the only way to iterate is over each GPIO individually. Once a chip is found, the number of GPIOs it provides can be skipped as a small optimization. This patch was requested by Arnd Bergmann here: http://article.gmane.org/gmane.linux.ports.tegra/3535Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: linux-kernel@vger.kernel.org Reviewed-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 14 8月, 2012 1 次提交
-
-
由 Arnd Bergmann 提交于
Commit 72121572 ("GPIO: gpio-pxa: fix devicetree functions") added an "xlate" function pointer to the irq_domain_ops, but this function is nor declared or defined anywhere when CONFIG_OF is disabled, causing the build error: drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function) Extending the DT-only code section to cover the irq_domain_ops and the pxa_gpio_dt_ids solves this problem and makes it clearer which code is actually used without DT. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 10 8月, 2012 1 次提交
-
-
由 Arnd Bergmann 提交于
The newly added gpio-em driver marks its em_gio_irq_domain_cleanup function as __devexit, which would lead to that function being discarded in case CONFIG_HOTPLUG is disabled. However, the function is also called by the error handling logic em_gio_probe, which would cause a jump into a NULL pointer if it was removed from the kernel or module. Without this patch, building kzm9d_defconfig results in: WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup() The function __devinit em_gio_probe() references a function __devexit em_gio_irq_domain_cleanup(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of em_gio_irq_domain_cleanup() so it may be used outside an exit section. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Cc: Magnus Damm <damm@opensource.se> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rafael J. Wysocki <rjw@sisk.pl>
-
- 07 8月, 2012 4 次提交
-
-
由 Julia Lawall 提交于
Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; } | ret = 0 ) ... when != ret = e1 *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...); ... when != x = e2 when != ret = e3 *if (x == NULL || ...) { ... when != ret = e4 * return ret; } // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Sean Paul 提交于
Move gpc4 to the end of the automatically processed gpio controllers so we don't taint the automatic offset calculation. This bug caused all controllers coming after gpc4 to map to the incorrect address. The result is <&gpd1 0 0 0 0> would actually map to GPIO 0 in gpd0. Signed-off-by: NSean Paul <seanpaul@chromium.org> Reviewed-by: NThomas Abraham <thomas.abraham@linaro.org> Acked-by: NDoug Anderson <dianders@chromium.org> Acked-by: NKukjin Kim <kgene.kim@samsung.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Shawn Guo 提交于
Currently, unlike the non-DT probe where the gpio base is specified with pdev->id, the DT probe uses the base dynamically allocated by gpio core, which uses a completely different numbering scheme. This causes two issues to user space applications which access sysfs entry /sys/class/gpio/gpioN. * It breaks the compatibility with user space applications between non-DT and DT kernels. * It's not intuitive and sometimes hard for users to map the Linux gpio number to the actual hardware pin. Use alias to identify the gpio port/bank, and then the gpio base can be specified with port id to solve above issues. If alias is not defined in device tree, the base number dynamically allocated by gpio core will be used. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Shawn Guo 提交于
With commit 3e11f7b8 (gpio/generic: initialize basic_mmio_gpio shadow variables properly) in place, the shadow variables initialization is being done in generic driver bgpio_init call. Remove the redundant shadow variables initialization from gpio-mxc driver. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 05 8月, 2012 3 次提交
-
-
由 Daniel Mack 提交于
Provide an of_xlate function for the PXA GPIO chips and make it work for devicetree environments. Successfully tested on a PXA3xx board. Signed-off-by: NDaniel Mack <zonque@gmail.com> Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Axel Lin 提交于
In the case offset is 20 ... 23, the equation to get the register should be: INTEL_MSIC_GPIO1HV0CTLO - offset + 20 With above equation, we can get below mapping between offset and the register: offset is 20: INTEL_MSIC_GPIO1HV0CTLO offset is 21: INTEL_MSIC_GPIO1HV1CTLO offset is 22: INTEL_MSIC_GPIO1HV2CTLO offset is 23: INTEL_MSIC_GPIO1HV3CTLO Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alan Cox 提交于
Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 25 7月, 2012 1 次提交
-
-
由 Laxman Dewangan 提交于
Converting the gpio driver of tps6586x to a platform driver in place of registering the gpio through core driver. The motivation of the change is: - This is inline with the mfd drivers implementation. - This will move the related gpio support to gpio driver folder where all gpio related drivers are available. This will be easy the maintenance and enhancement is anything done for gpio. - The gpio functionality can be selected through config variable. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 18 7月, 2012 9 次提交
-
-
由 Roland Stigge 提交于
of_get_named_gpio_flags() and of_get_named_gpio() return -EPROBE_DEFER if the respective GPIO is not (yet) available. This is useful if driver's probe() functions try to get a GPIO whose controller isn't probed yet. Thus, the driver can be probed again later on. The function still returns -EINVAL on other errors (parse error or node doesn't exist). This way, the case of an optional/intentionally missing GPIO is handled appropriately. Signed-off-by: NRoland Stigge <stigge@antcom.de> Acked-by: NAlexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mark Brown 提交于
Since users must be explicitly provided with a GPIO number in order to request one the overwhelmingly common case for failing to request will be that the required GPIO driver has not yet registered and we should therefore defer until it has registered. In order to avoid having to code this logic in individual drivers have gpio_request() return -EPROBE_DEFER when failing to look up the GPIO. Drivers which don't want this behaviour can override it if they desire. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Leed Aguilar 提交于
Increase variable size from u16 to u32 to allocate 24 bit of data required for the TCA6424 I/O expander device type. Signed-off-by: NLeed Aguilar <leed.aguilar@ti.com> Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Chandrabhanu Mahapatra 提交于
TCA6424 is a low voltage 24 bit I2C and SMBus I/O expander of pca953x family similar to its 16 bit predecessor TCA6416. It comes with three 8-bit active Input, Output, Polarity Inversion and Configuration registers each. The polarity of Input ports can be reversed by setting the appropiate bit in Polarity Inversion registers. The variables corresponding to Input, Output and Configuration registers have already been updated to support 24 bit values. This patch thus updates the invert variable of PCA953X platform data to support 24 bit. Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Tarun Kanti DebBarma 提交于
Since the bank->dbck initialization in a one time operation there is no need to keep this within gpio_debounce(). Therefore, moving clk_get(bank->dbck) to omap_gpio_mod_init(). Since the value of bank->dbck would be NULL at the beginning, this check has been removed. Signed-off-by: NTarun Kanti DebBarma <tarun.kanti@ti.com> Reported-by: NPaul Walmsley <paul@pwsan.com> Reviewed-by: NJon Hunter <jon-hunter@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Cousson, Benoit <b-cousson@ti.com> Reviewed-by: NPaul Walmsley <paul@pwsan.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Benoît Thébaudeau 提交于
Some mxc processors have an edge_sel feature, which allows the IRQ to be triggered by any edge. This patch makes use of this feature if available, which skips mxc_flip_edge(). Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@stericsson.com> Acked-by: NSascha Hauer <kernel@pengutronix.de> Cc: <linux-arm-kernel@lists.infradead.org> Signed-off-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexandre Courbot 提交于
Make of_get_named_gpio_flags propagate any error it receives from of_parse_phandle_with_args instead of inconditionally returning -EINVAL. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Olof Johansson 提交于
This adds a flags field to the gpio specifier for Samsung. I didn't want to add yet another field in the already quite long specifier, so I decided to compress it together with the Pull Up/Down settings instead. This is needed to, for example, have a gpio-keys input that is active low. Signed-off-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mark Brown 提交于
The Arizona class devices provide some GPIOs for use in the system. This driver provides support for these via gpiolib. Currently interrupts are not supported, normally the GPIOs are outputs only. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> [Fold in WM5110 support patch] Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 12 7月, 2012 6 次提交
-
-
由 Roland Stigge 提交于
This patch helps mapping with gpio_to_irq for the GPIOs that are irq enabled. Signed-off-by: NRoland Stigge <stigge@antcom.de> Tested-by: NAlexandre Pereira da Silva <aletes.xgr@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kuninori Morimoto 提交于
This patch adds 8/16 bit write/read functions, and shared gpio input/output/set/get functions. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Roland Stigge 提交于
Since LPC32xx is now switched over to devicetree based GPIO, the unused lpc32xx_gpio_init() can be removed. Further, the driver title changed since it referred to the wrong file. Signed-off-by: NRoland Stigge <stigge@antcom.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mark Brown 提交于
This has no practical impact at present since we don't support device tree so any user must have set an irq_base but this will in future allow a transition to device tree with minimal invasiveness. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Dmitry Eremin-Solenikov 提交于
Add a driver to use GPIO pins available on several AMD south bridges (currently only AMD 8111 is supported). Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 11 7月, 2012 1 次提交
-
-
由 Jerry Snitselaar 提交于
commit 626f9914 added code to initialize gpio_chip.of_node, but if CONFIG_OF_GPIO is not defined gps-tps65910 fails to build with an error complaining gpio_chip has no member of_node. I ran into this while doing a allyesconfig build on linux-next. Signed-off-by: NGerard Snitselaar <dev@snitselaar.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 05 7月, 2012 6 次提交
-
-
由 Laxman Dewangan 提交于
Initialize the gpio chip's of_node to the device's node to work with DT based system. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Uwe Kleine-König 提交于
The chained handler was set for the platform device with id == 0. When the gpio devices are instantiated by a device tree, all have id == -1 and so the handler was unset resulting in unusable gpio irqs on i.MX21 and i.MX27 (when using oftree). Acked-by: NShawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Stephen Warren 提交于
Without this, modules can't use this API, leading to build failures. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mark Brown 提交于
Not paying attention to the value being set is a bad thing because it means that we'll not set the hardware up to reflect what was requested. Not setting the hardware up to reflect what was requested means that the caller won't get the results they wanted. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Christian Dietrich 提交于
The feature GPIO_MSM_V1 is only available on three SoCs. On all other MSM SoCs the INT_GPIO_GROUP{1,2} is undeclared, but Kconfig does allow such configurations. Therefore the produced configuration is valid, but does not compile. The problem is fixed by adding the missing Kconfig constraints. drivers/gpio/gpio-msm-v1.c: In function âmsm_init_gpioâ: drivers/gpio/gpio-msm-v1.c:629:26: error: 'INT_GPIO_GROUP1' undeclared drivers/gpio/gpio-msm-v1.c:630:26: error: 'INT_GPIO_GROUP2' undeclared Signed-off-by: NChristian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alessandro Rubini 提交于
If there is no platform data available, the driver shouldn't use the pointer or it will oops. Since things will mostly work nonetheless, (the BIOS may have set up the pins properly), I'd better not fail the probe even in this case. Signed-off-by: NAlessandro Rubini <rubini@gnudd.com> Acked-by: NGiancarlo Asnaghi <giancarlo.asnaghi@st.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 04 7月, 2012 1 次提交
-
-
由 Jon Hunter 提交于
Currently the gpio _runtime_resume/suspend functions are calling the get_context_loss_count() platform function if the function is populated for a gpio bank. This function is used to determine if the gpio bank logic state needs to be restored due to a power transition. This function will be populated for all banks, but it should only be called for banks that have the "loses_context" variable set. It is pointless to call this if loses_context is false as we know the context will never be lost and will not need restoring. For all OMAP2+ devices gpio bank-0 is in an always-on power domain and so will never lose context. We found that the get_context_loss_count() was being called for bank-0 during the probe and returning 1 instead of 0 indicating that the context had been lost. This was causing the context restore function to be called at probe time for this bank and because the context had never been saved, was restoring an invalid state. This ultimately resulted in a crash [1]. This issue is a regression that was exposed by commit 1b128703 (gpio/omap: fix missing check in *_runtime_suspend()). There are multiple bugs here that need to be addressed ... 1. Why the always-on power domain returns a context loss count of 1? This needs to be fixed in the power domain code [2]. However, the gpio driver should not assume the loss count is 0 to begin with. 2. The omap gpio driver should never be calling get_context_loss_count for a gpio bank in a always-on domain. This is pointless and adds unneccessary overhead. 3. The OMAP gpio driver assumes that the initial power domain context loss count will be 0 at the time the gpio driver is probed. However, it could be possible that this is not the case and an invalid context restore could be performed during the probe. To avoid this only populate the get_context_loss_count() function pointer after the initial call to pm_runtime_get() has occurred. This will ensure that the first pm_runtime_put() initialised the loss count correctly. This patch addresses issues 2 and 3 above. [1] http://marc.info/?l=linux-omap&m=134065775323775&w=2 [2] http://marc.info/?l=linux-omap&m=134100413303810&w=2 Cc: Kevin Hilman <khilman@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> Cc: Franky Lin <frankyl@broadcom.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: NeilBrown <neilb@suse.de> Reported-by: NFranky Lin <frankyl@broadcom.com> Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: NFranky Lin <frankyl@broadcom.com> Acked-by: NKevin Hilman <khilman@ti.com> Tested-by: NNeilBrown <neilb@suse.de> Signed-off-by: NJon Hunter <jon-hunter@ti.com> Signed-off-by: NKevin Hilman <khilman@ti.com>
-
- 01 7月, 2012 1 次提交
-
-
由 Shawn Guo 提交于
Move irq_domain_add_legacy call from imx*-dt.c into gpio driver and have the gpio driver adopt irqdomain support for both DT and non-DT boot. With all imx platform code converted from static gpio irq number computation to use run-time gpio_to_irq call, we can now use irq_alloc_descs and irqdomain support to dynamically get irq_base and have the mapping between gpio and irq number available without using virtual_irq_start and MXC_GPIO_IRQ_START. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NDong Aisheng <dong.aisheng@linaro.org>
-
- 27 6月, 2012 1 次提交
-
-
由 Grazvydas Ignotas 提交于
It seems that currently GPIO module is not working correctly during idle when debounce is enabled - the system almost never responds to button presses (observed on OMAP3530 ES2.1 and OMAP3630 ES1.2 pandora boards). Even though wakeups are probably working, it seems that the GPIO module itself is unable to detect input events and generate interrupts. OMAP35x TRM also states that: "If the debounce clock is inactive, the debounce cell gates all input signals and thus cannot be used." So whenever we are disabling debounce clocks (for PM or other reasons), be sure the module's debounce feature is disabled too. Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com> Signed-off-by: NKevin Hilman <khilman@ti.com>
-
- 04 6月, 2012 1 次提交
-
-
由 Kukjin Kim 提交于
Should be 'exynos5_xxx' instead of 'exonys5_xxx'. It happened at the commit 30b84288 ("Merge tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc") during v3.5 merge window. Signed-off-by: NKukjin Kim <kgene.kim@samsung.com> [ My bad - Linus ] Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 26 5月, 2012 1 次提交
-
-
由 Andreas Schallenberg 提交于
This is a follow-up to ae79c190 "[PATCH v2] Add support for TCA6424" merged in the v3.5 merge window. It fixes comments made when the patch was merged. - Use 3 byte transfers instead of two separate transfers (2+1 byte) - An unnecessary cast removed Signed-off-by: NAndreas Schallenberg <Andreas.Schallenberg@3alitytechnica.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-