aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-of.c
AgeCommit message (Collapse)AuthorFilesLines
2012-11-11gpiolib: provide provision to register pin rangesShiraz Hashim1-0/+56
pinctrl subsystem needs gpio chip base to prepare set of gpio pin ranges, which a given pinctrl driver can handle. This is important to handle pinctrl gpio request calls in order to program a given pin properly for gpio operation. As gpio base is allocated dynamically during gpiochip registration, presently there exists no clean way to pass this information to the pinctrl subsystem. After few discussions from [1], it was concluded that may be gpio controller reporting the pin range it supports, is a better way than pinctrl subsystem directly registering it. [1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/184816 Cc: Grant Likely <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Shiraz Hashim <[email protected]> [Edited documentation a bit] Signed-off-by: Linus Walleij <[email protected]>
2012-08-17gpio: Fix debug message in of_get_named_gpio_flags()Thierry Reding1-1/+1
This was probably missed in the conversion done in commit 3d0f7cf ("gpio: Adjust of_xlate API to support multiple GPIO chips"). Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-07-17gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet availableRoland Stigge1-1/+4
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: Roland Stigge <[email protected]> Acked-by: Alexandre Pereira da Silva <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-07-17gpio: propagate of_parse_phandle_with_args errorsAlexandre Courbot1-1/+1
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: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2012-05-25gpio/of: fix a typo of comment messageDong Aisheng1-1/+1
Signed-off-by: Dong Aisheng <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-18gpio: Adjust of_xlate API to support multiple GPIO chipsGrant Likely1-42/+38
This patch changes the of_xlate API to make it possible for multiple gpio_chips to refer to the same device tree node. This is useful for banked GPIO controllers that use multiple gpio_chips for a single device. With this change the core code will try calling of_xlate on each gpio_chip that references the device_node and will return the gpio number for the first one to return 'true'. Tested-by: Roland Stigge <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-05-08Merge tag 'v3.4-rc6' into gpio/nextGrant Likely1-1/+1
Linux 3.4-rc6
2012-04-07gpio: Move DT support code into drivers/gpioGrant Likely1-0/+240
The code in drivers/of/gpio.c isn't shared by any other subsystem since it is all gpiolib specific. drivers/gpio is a better place to maintain these functions. Signed-off-by: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Linus Walleij <[email protected]>