-
- Downloads
gpio: Make of_count_named_gpios() use new of_count_phandle_with_args()
This patch replaces the horribly coded of_count_named_gpios() with a call to of_count_phandle_with_args() which is far more efficient. This also changes the return value of of_gpio_count() & of_gpio_named_count() from 'unsigned int' to 'int' so that it can return an error code. All the users of that function are fixed up to correctly handle a negative return value. v2: Split GPIO portion into a separate patch Tested-by:Andreas Larsson <andreas@gaisler.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com>
Showing
- drivers/gpio/gpiolib-of.c 0 additions, 35 deletionsdrivers/gpio/gpiolib-of.c
- drivers/hwmon/gpio-fan.c 2 additions, 2 deletionsdrivers/hwmon/gpio-fan.c
- drivers/input/keyboard/matrix_keypad.c 4 additions, 4 deletionsdrivers/input/keyboard/matrix_keypad.c
- drivers/net/phy/mdio-mux-gpio.c 2 additions, 2 deletionsdrivers/net/phy/mdio-mux-gpio.c
- drivers/spi/spi-fsl-spi.c 2 additions, 2 deletionsdrivers/spi/spi-fsl-spi.c
- drivers/spi/spi-oc-tiny.c 4 additions, 4 deletionsdrivers/spi/spi-oc-tiny.c
- drivers/spi/spi-ppc4xx.c 2 additions, 2 deletionsdrivers/spi/spi-ppc4xx.c
- drivers/spi/spi.c 2 additions, 3 deletionsdrivers/spi/spi.c
- include/linux/of_gpio.h 23 additions, 17 deletionsinclude/linux/of_gpio.h
Loading
Please register or sign in to comment