summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max732x.c
diff options
context:
space:
mode:
authorRaphaël Teysseyre <rteysseyre@gmail.com>2015-06-24 09:19:45 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-07-16 13:28:33 +0200
commit5b2c9121ef7cf9745f0c1df10544fd0ba6a6a38c (patch)
treefbfd26c2dd0615725efa1ecb0ce9c2aa8f52bc2a /drivers/gpio/gpio-max732x.c
parentgpio: zynq: Fix problem with unbalanced pm_runtime_enable (diff)
downloadlinux-5b2c9121ef7cf9745f0c1df10544fd0ba6a6a38c.tar.xz
linux-5b2c9121ef7cf9745f0c1df10544fd0ba6a6a38c.zip
gpio/xilinx: Use correct address when setting initial values.
xgpio_save_regs() is used in this driver to setup the initial values of the registers in the hardware. The relevant registers at that time are: 0x0 -> channel 0 data (32 bits, one for each GPIO on this channel). 0x4 -> channel 0 tri, controls in/out status for each GPIO of this channel. 0x8 -> channel 1 data 0xC -> channel 1 tri gpio-xilinx.c defines these: XGPIO_DATA_OFFSET (0x0) XGPIO_TRI_OFFSET (0x4) XGPIO_CHANNEL_OFFSET 0x8 Before this patch, the "data" register value of channel 1 was written at 0x4 intead of 0x8 (overwriting the channel 0 "tri" register), and the "tri" register value for channel 1 was written at 0x8 instead of 0xC. Signed-off-by: Raphaël Teysseyre <rteysseyre@gmail.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
0 files changed, 0 insertions, 0 deletions