u-boot/drivers/gpio
Simon Glass 651827c0fc tegra: gpio: Show the GPIO value for outputs
The tegra GPIO controller has two ways of reading the value of a GPIO. It
can supply the 'input' value (which is the value read from the pin) and the
'output' value (which is the value being driven from the pin. With a GPIO
set to output mode, the 'input' value is always low which is not very
useful.

This has the unfortunate result that setting a GPIO high still leaves it
showing as low in the 'gpio status' command.

Adjust the driver to check which direction the GPIO is set to, then read
the value from the appropriate register: 'input' for input GPIOs, 'output'
for output GPIOs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16 09:17:50 -07:00
..
adi_gpio2.c blackfin: Move machine specific gpio_port_t structure back to blackfin arch folder. 2013-11-04 16:50:46 +08:00
altera_pio.c altera_pio: change ioremap to map_physmem 2015-11-18 21:18:30 +08:00
at91_gpio.c dm: core: Add dev_get_uclass_priv() to access uclass private data 2015-04-16 19:27:42 -06:00
atmel_pio4.c gpio: atmel: Add the PIO4 driver support 2015-11-30 22:27:52 +01:00
axp_gpio.c sunxi: power: Unify axp pmic function names 2015-10-20 18:40:27 +02:00
bcm2835_gpio.c dm: core: Add dev_get_uclass_priv() to access uclass private data 2015-04-16 19:27:42 -06:00
da8xx_gpio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
db8500_gpio.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
dwapb_gpio.c gpio: Add DW APB GPIO driver 2015-08-23 11:56:20 +02:00
gpio-uclass.c bug.h: move BUILD_BUG_* defines to include/linux/bug.h 2016-01-25 10:39:59 -05:00
hi6220_gpio.c dm: gpio: hi6220: Add a hi6220 GPIO driver model driver. 2015-08-12 20:47:58 -04:00
intel_ich6_gpio.c x86: ich6_gpio: Convert to use proper DM API 2016-02-05 12:47:21 +08:00
Kconfig drivers: gpio: add driver for Microchip PIC32 GPIO controller. 2016-02-01 22:14:00 +01:00
kona_gpio.c gpio: kona: Add Kona gpio driver 2014-02-22 19:30:27 +01:00
kw_gpio.c gpio: make local functions static 2014-10-25 07:02:01 -04:00
lpc32xx_gpio.c gpio: lpc32xx: fix issues with port3 gpio 2015-09-11 17:15:34 -04:00
Makefile drivers: gpio: add driver for Microchip PIC32 GPIO controller. 2016-02-01 22:14:00 +01:00
mpc83xx_gpio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mvgpio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mvgpio.h mvgpio: remove CONFIG_SHEEVA_88SV331xV5 dependency 2015-04-23 13:59:18 -04:00
mvmfp.c gpio: mvmfp: support newer MFP bit definitions 2015-04-23 13:59:18 -04:00
mxc_gpio.c imx: mxc_gpio: add support for imx7d SoC 2015-09-02 15:31:33 +02:00
mxs_gpio.c gpio: mxs: add name_to_gpio() function 2016-01-07 17:54:16 +01:00
omap_gpio.c drivers: gpio: omap: add support for parsing additional gpio parameters 2015-10-22 14:44:02 -04:00
pca953x.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
pca9698.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pic32_gpio.c drivers: gpio: add driver for Microchip PIC32 GPIO controller. 2016-02-01 22:14:00 +01:00
rk_gpio.c rockchip: gpio: Implement the get_function() method 2016-01-21 20:42:35 -07:00
s3c2440_gpio.c gpio: s3c: Fix the GPIO driver 2015-05-06 17:00:58 +09:00
s5p_gpio.c gpio: s5p: call: dev_get_addr() instead of fdtdec_get_addr() 2015-10-03 14:39:19 +01:00
sandbox.c dm: core: Add dev_get_uclass_priv() to access uclass private data 2015-04-16 19:27:42 -06:00
sh_pfc.c gpio: sh-pfc: fix gpio input read 2015-08-31 17:26:03 +09:00
spear_gpio.c gpio: spear_gpio: Fix gpio_set_value() implementation 2014-07-04 21:37:29 +02:00
stm32_gpio.c Change e-mail address of Kamil Lulko 2015-12-05 18:22:32 -05:00
sunxi_gpio.c dm: Use dev_get_addr() where possible 2015-08-31 07:57:26 -06:00
sx151x.c Add support for SX151x SPI GPIO Expanders 2013-11-08 09:39:13 -05:00
tca642x.c gpio: tca642x: Add the tca642x gpio expander driver 2013-07-30 09:21:42 -04:00
tegra_gpio.c tegra: gpio: Show the GPIO value for outputs 2016-02-16 09:17:50 -07:00
vybrid_gpio.c dm: vybrid_gpio: Drop legacy code 2016-02-02 21:36:10 +01:00
xilinx_gpio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
zynq_gpio.c gpio: add Xilinx Zynq PS GPIO driver 2015-04-29 10:41:24 +02:00