An error occurred fetching the project authors.
- 19 Sep, 2016 1 commit
-
-
Linus Walleij authored
There is no point in adding any default trigger for these GPIO interrupts: the device tree should contain all trigger information and the platforms using the driver boots exclusively from device tree. Also the boot log is nagging me to fix this: [ 0.771057] ------------[ cut here ]------------ [ 0.775695] WARNING: CPU: 0 PID: 1 at ../drivers/gpio/gpiolib.c:1622 _gpiochip_irqchip_add+0x138/0x160 [ 0.785034] /soc/gpio@8012e000: Ignoring 2 default trigger (...) [ 0.942962] gpio 8012e000.gpio: at address e08f8000 (etc ad nauseam) Suggested-by:
Marc Zyngier <marc.zyngier@arm.com> Acked-by:
Marc Zyngier <marc.zyngier@arm.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 27 Aug, 2016 1 commit
-
-
Paul Gortmaker authored
The Kconfig currently controlling compilation of this code is: drivers/pinctrl/nomadik/Kconfig:config PINCTRL_NOMADIK drivers/pinctrl/nomadik/Kconfig: bool "Nomadik pin controller driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. We delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alessandro Rubini <rubini@unipv.it> Cc: linux-gpio@vger.kernel.org Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 11 Aug, 2016 1 commit
-
-
Julia Lawall authored
Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2,x; @@ - if (of_get_property(e1,e2,NULL)) - x = true; - else - x = false; + x = of_property_read_bool(e1,e2); // </smpl> Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 13 Jun, 2016 1 commit
-
-
Ben Dooks authored
There are five functions in the driver that are defined but only used locally. Since these are not used in the current kernel, delete them to avoid the following warnings: drivers/pinctrl/nomadik/pinctrl-nomadik.c:1036:6: warning: symbol 'nmk_gpio_clocks_enable' was not declared. Should it be static? drivers/pinctrl/nomadik/pinctrl-nomadik.c:1050:6: warning: symbol 'nmk_gpio_clocks_disable' was not declared. Should it be static? drivers/pinctrl/nomadik/pinctrl-nomadik.c:1073:6: warning: symbol 'nmk_gpio_wakeups_suspend' was not declared. Should it be static? drivers/pinctrl/nomadik/pinctrl-nomadik.c:1094:6: warning: symbol 'nmk_gpio_wakeups_resume' was not declared. Should it be static? drivers/pinctrl/nomadik/pinctrl-nomadik.c:1120:6: warning: symbol 'nmk_gpio_read_pull' was not declared. Should it be static? Signed-off-by:
Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 30 May, 2016 1 commit
-
-
Linus Walleij authored
The input/output directions were inversed on the GPIO direction read function. Loose a ! and it is correct. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 09 May, 2016 1 commit
-
-
Arnd Bergmann authored
nmk_gpio_get_mode is only used in one place, and that is conditionally compiled if DEBUG_FS is enabled. A recent cleanup has marked the definition 'static', which now leads to a warning: drivers/pinctrl/nomadik/pinctrl-nomadik.c:614:12: error: 'nmk_gpio_get_mode' defined but not used [-Werror=unused-function] static int nmk_gpio_get_mode(struct nmk_gpio_chip *nmk_chip, int offset) ^~~~~~~~~~~~~~~~~ Moving the function itself inside the #ifdef shuts it up again. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Fixes: 5e81e0a0 ("pinctrl: nomadik: use BIT() with offsets consequently") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 28 Apr, 2016 2 commits
-
-
Linus Walleij authored
This makes the Nomadik gpiochip support the .get_direction() callback. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This driver is confusing in referencing/dereferencing the global GPIO number scope in some places and using local offsets in other places. Remove some of the confusion by removing local "bit" and "bitmask" definitions and just use BIT(offset) directly. Also unexport a function only used in this file. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 20 Apr, 2016 1 commit
-
-
Laxman Dewangan authored
Use devm_pinctrl_register() for pin control registration. Signed-off-by:
Laxman Dewangan <ldewangan@nvidia.com> Cc: Alessandro Rubini <rubini@unipv.it> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 01 Apr, 2016 1 commit
-
-
Irina Tirdea authored
Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map, since it does not depend on device tree despite the current name. This will enforce a consistent naming in pinctr-utils.c and will make it clear it can be called from outside device tree (e.g. from ACPI handling code). Signed-off-by:
Irina Tirdea <irina.tirdea@intel.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 31 Mar, 2016 1 commit
-
-
Linus Walleij authored
Pull up was reported as pull down and vice versa. Fix this. Fixes: 8f1774a2 "pinctrl: nomadik: improve GPIO debug prints" Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 05 Jan, 2016 1 commit
-
-
Linus Walleij authored
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 19 Nov, 2015 1 commit
-
-
Linus Walleij authored
The name .dev in a struct is normally reserved for a struct device that is let us say a superclass to the thing described by the struct. struct gpio_chip stands out by confusingly using a struct device *dev to point to the parent device (such as a platform_device) that represents the hardware. As we want to give gpio_chip:s real devices, this is not working. We need to rename this member to parent. This was done by two coccinelle scripts, I guess it is possible to combine them into one, but I don't know such stuff. They look like this: @@ struct gpio_chip *var; @@ -var->dev +var->parent and: @@ struct gpio_chip var; @@ -var.dev +var.parent and: @@ struct bgpio_chip *var; @@ -var->gc.dev +var->gc.parent Plus a few instances of bgpio that I couldn't figure out how to teach Coccinelle to rewrite. This patch hits all over the place, but I *strongly* prefer this solution to any piecemal approaches that just exercise patch mechanics all over the place. It mainly hits drivers/gpio and drivers/pinctrl which is my own backyard anyway. Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Alek Du <alek.du@intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by:
Lee Jones <lee.jones@linaro.org> Acked-by:
Jiri Kosina <jkosina@suse.cz> Acked-by:
Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by:
Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 16 Oct, 2015 1 commit
-
-
Jonas Gorski authored
Replace all trivial request/free callbacks that do nothing but call into pinctrl code with the generic versions. Signed-off-by:
Jonas Gorski <jogo@openwrt.org> Acked-by:
Bjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by:
Heiko Stuebner <heiko@sntech.de> Acked-by:
Eric Anholt <eric@anholt.net> Acked-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Andrew Bresticker <abrestic@chromium.org> Acked-by:
Baruch Siach <baruch@tkos.co.il> Acked-by:
Matthias Brugger <matthias.bgg@gmail.com> Acked-by:
Lee Jones <lee@kernel.org> Acked-by:
Laxman Dewangan <ldewangan@nvidia.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 16 Sep, 2015 1 commit
-
-
Thomas Gleixner authored
Most interrupt flow handlers do not use the irq argument. Those few which use it can retrieve the irq number from the irq descriptor. Remove the argument. Search and replace was done with coccinelle and some extra helper scripts around it. Thanks to Julia for her help! Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Jiang Liu <jiang.liu@linux.intel.com>
-
- 11 Aug, 2015 1 commit
-
-
Linus Walleij authored
Let us see the current value on the input line in debugfs. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 27 Jul, 2015 2 commits
-
-
Linus Walleij authored
We no longer have to do GPIO initialization before the pinctrl initialization, instead we can initialize the pinctrl portions of the driver first and then the GPIO. Thus we can move GPIO initialization to a subsystem_initcall(), but not yet to a device_initcall(). Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This gets the GPIO ranges out of the driver and into the device tree where they belong. Standard DT bindings already exist for this. Since no systems with this are deployed we can just augment all device trees and the drivers at the same time and simplify the world. This also defines the array of GPIO chips related to the pin controller. Cc: arm@kernel.org Acked-by:
Olof Johansson <olof@lixom.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 23 Jul, 2015 3 commits
-
-
Linus Walleij authored
If the pin controller probes before the GPIO driver it needs to populate the GPIO driver state containers ahead of the actual driver probe as the addresses are used by both halves of the driver. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Instead of indexing around the GPIO ranges to find a chip, look directly in the local array of state containers for nmk_gpio_chip:s. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Break out the function that allocates the nomadik GPIO chip state container to its own function. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 17 Jul, 2015 1 commit
-
-
Jiang Liu authored
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by:
Jiang Liu <jiang.liu@linux.intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-gpio@vger.kernel.org Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
- 10 Jun, 2015 1 commit
-
-
Masahiro Yamada authored
Currently, pinctrl_register() just returns NULL on error, so the callers can not know the exact reason of the failure. Some of the pinctrl drivers return -EINVAL, some -ENODEV, and some -ENOMEM on error of pinctrl_register(), although the error code might be different from the real cause of the error. This commit reworks pinctrl_register() to return the appropriate error code and modifies all of the pinctrl drivers to use IS_ERR() for the error checking and PTR_ERR() for getting the error code. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by:
Patrice Chotard <patrice.chotard@st.com> Acked-by:
Thierry Reding <treding@nvidia.com> Acked-by:
Heiko Stuebner <heiko@sntech.de> Tested-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Lee Jones <lee@kernel.org> Acked-by:
Sören Brinkmann <soren.brinkmann@xilinx.com> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Ray Jui <rjui@broadcom.com> Acked-by:
Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by:
Hongzhou Yang <hongzhou.yang@mediatek.com> Acked-by:
Wei Chen <Wei.Chen@csr.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 06 May, 2015 2 commits
-
-
Linus Walleij authored
Assign GPIO chip and irqchip to the GPIO container dynamically, so we can set a unique name for each GPIO irqchip and see what chip the hwirq offset actually relates to. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This activates strict mode muxing for the Nomadik pin controllers, as these do not allow GPIO and functions to use the same pin simultaneously. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 20 Oct, 2014 3 commits
-
-
Wolfram Sang authored
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Linus Walleij authored
This converts the Nomadik pin controller and all associated device trees to use the standard, generic config bindings for pin controllers. There are no such device trees deployed in the wild so this is safe to do to set a good example. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This converts the Nomadik pin controller and all associated device trees to use the standard, generic mux bindings for pin controllers. There are no such device trees deployed in the wild so this is safe to do to set a good example. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 30 Sep, 2014 1 commit
-
-
Linus Walleij authored
The debugfs file would only define if the line was "pulled" and not which direction (pull up or pull down). Improve this by taking two print paths depending on whether the pin is set as input or output and use the data register directly to figure out whether the pin is set for pull up or pull down. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 29 Sep, 2014 3 commits
-
-
Linus Walleij authored
We refactor the DT parser to look for either a config or a function and then look for further nodes and reserve maps, not the two things mixed up like prior to this patch. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Stop brewing our own map free function and rely on the pinctrl utils helpers. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Stop brewing our own pin map reservation function and use the generic code. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 23 Sep, 2014 1 commit
-
-
Linus Walleij authored
Some drivers accidentally still use the return value from gpiochip_remove(). Get rid of them so we can simplify this function and get rid of the return value. Cc: Abdoulaye Berthe <berthe.ab@gmail.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 04 Sep, 2014 1 commit
-
-
Linus Walleij authored
commit 2243a87d "pinctrl: avoid duplicated calling enable_pinmux_setting for a pin" removed the .disable callback from the struct pinmux_ops, making the .enable() callback the only remaining callback. However .enable() is a bad name as it seems to imply that a muxing can also be disabled. Rename the callback to .set_mux() and also take this opportunity to clean out any remaining mentions of .disable() from the documentation. Acked-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Bjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by:
Fan Wu <fwu@marvell.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 11 Jul, 2014 2 commits
-
-
Linus Walleij authored
We have a bunch of Nomadik family pin control drivers, so let's move them into their own subdirectory. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Fan Wu authored
What the patch does: 1. Call pinmux_disable_setting ahead of pinmux_enable_setting each time pinctrl_select_state is called 2. Remove the HW disable operation in pinmux_disable_setting function. 3. Remove the disable ops in struct pinmux_ops 4. Remove all the disable ops users in current code base. Notes: 1. Great thanks for the suggestion from Linus, Tony Lindgren and Stephen Warren and Everyone that shared comments on this patch. 2. The patch also includes comment fixes from Stephen Warren. The reason why we do this: 1. To avoid duplicated calling of the enable_setting operation without disabling operation inbetween which will let the pin descriptor desc->mux_usecount increase monotonously. 2. The HW pin disable operation is not useful for any of the existing platforms. And this can be used to avoid the HW glitch after using the item #1 modification. In the following case, the issue can be reproduced: 1. There is a driver that need to switch pin state dynamically, e.g. between "sleep" and "default" state 2. The pin setting configuration in a DTS node may be like this: component a { pinctrl-names = "default", "sleep"; pinctrl-0 = <&a_grp_setting &c_grp_setting>; pinctrl-1 = <&b_grp_setting &c_grp_setting>; } The "c_grp_setting" config node is totally identical, maybe like following one: c_grp_setting: c_grp_setting { pinctrl-single,pins = <GPIO48 AF6>; } 3. When switching the pin state in the following official pinctrl sequence: pin = pinctrl_get(); state = pinctrl_lookup_state(wanted_state); pinctrl_select_state(state); pinctrl_put(); Test Result: 1. The switch is completed as expected, that is: the device's pin configuration is changed according to the description in the "wanted_state" group setting 2. The "desc->mux_usecount" of the corresponding pins in "c_group" is increased without being decreased, because the "desc" is for each physical pin while the setting is for each setting node in the DTS. Thus, if the "c_grp_setting" in pinctrl-0 is not disabled ahead of enabling "c_grp_setting" in pinctrl-1, the desc->mux_usecount will keep increasing without any chance to be decreased. According to the comments in the original code, only the setting, in old state but not in new state, will be "disabled" (calling pinmux_disable_setting), which is correct logic but not intact. We still need consider case that the setting is in both old state and new state. We can do this in the following two ways: 1. Avoid to "enable"(calling pinmux_enable_setting) the "same pin setting" repeatedly 2. "Disable"(calling pinmux_disable_setting) the "same pin setting", actually two setting instances, ahead of enabling them. Analysis: 1. The solution #2 is better because it can avoid too much iteration. 2. If we disable all of the settings in the old state and one of the setting(s) exist in the new state, the pins mux function change may happen when some SoC vendors defined the "pinctrl-single,function-off" in their DTS file. old_setting => disabled_setting => new_setting. 3. In the pinmux framework, when a pin state is switched, the setting in the old state should be marked as "disabled". Conclusion: 1. To Remove the HW disabling operation to above the glitch mentioned above. 2. Handle the issue mentioned above by disabling all of the settings in old state and then enable the all of the settings in new state. Signed-off-by:
Fan Wu <fwu@marvell.com> Acked-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Patrice Chotard <patrice.chotard@st.com> Acked-by:
Heiko Stuebner <heiko@sntech.de> Acked-by:
Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 14 Apr, 2014 1 commit
-
-
Linus Walleij authored
I left this in by mistake, get rid of it. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 26 Mar, 2014 1 commit
-
-
Linus Walleij authored
This converts the Nomadik pin control driver to register its chained irq handler and irqchip using the helpers in the gpiolib core. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 25 Mar, 2014 2 commits
-
-
Linus Walleij authored
The old platform data struct is just a leftover from the times when the driver was not probed exclusively from the device tree. Factor this into the general state container and simplify the probe path. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The "secondary irq" in the nomadik pin control driver is actually not secondary (as in: can occur any time alongside the ordinary irq), it is a latent IRQ. It is an IRQ that has occurred when the system was in sleep state and has been cached in a special register flagged from the low power management unit (PRCM). Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-