summaryrefslogtreecommitdiffstats
path: root/drivers/of/gpio.c
Commit message (Collapse)AuthorAgeFilesLines
* of/gpio: Implement of_gpio_count()Anton Vorontsov2008-12-211-0/+34
| | | | | | | | This function is used to count how many GPIOs are specified for a device node. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* of/gpio: Implement of_get_gpio_flags()Anton Vorontsov2008-12-031-7/+29
| | | | | | | | | | | | | | This adds a new function, of_get_gpio_flags, which is like of_get_gpio(), but accepts a new "flags" argument. This new function will be used by the drivers that need to retrieve additional GPIO information, such as active-low flag. Also, this changes the default ("simple") .xlate routine to warn about bogus (< 2) #gpio-cells usage: the second cell should always be present for GPIO flags. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* of: Add new helper of_parse_phandles_with_args()Anton Vorontsov2008-10-131-62/+19
| | | | | | | | The helper is factored out of of_get_gpio(). Will be used by the QE pin multiplexing functions (they need to parse the gpios = <> too). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* [POWERPC] of/gpio: Use dynamic base allocationAnton Vorontsov2008-05-231-37/+1
| | | | | | | | | | | Since the "gpiolib: dynamic gpio number allocation" patch was recently merged into Linus' tree (commit 8d0aab2f16c4fa170f32e7a74a52cd0122bbafef), we can use dynamic GPIO base allocation now. This, in turn, removes number of gpios per chip constraint. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] OF helpers for the GPIO APIAnton Vorontsov2008-04-171-0/+242
This implements various helpers to support OF bindings for the GPIO LIB API. Previously this was PowerPC specific, but it seems this code isn't arch-dependent anyhow, so let's place it into of/. SPARC will not see this addition yet, real hardware seem to not use GPIOs at all. But this might change: http://www.leox.org/docs/faq_MLleon.html "16-bit I/O port" sounds promising. :-) Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
OpenPOWER on IntegriCloud