]> git.baikalelectronics.ru Git - uboot.git/commit
DM: GPIO: Fix da8xx GPIO indexing over GPIO 32
authorAdam Ford <aford173@gmail.com>
Fri, 17 Aug 2018 04:13:34 +0000 (23:13 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 12 Sep 2018 01:37:50 +0000 (21:37 -0400)
commite43da535e80148bbbc3b1bce0fdb95bf8ebfde9c
treeca778befd9d7359d22df74f256fbe41f70e36590
parentba429ac88a73061c7870770dabe9669c69e6fcd7
DM: GPIO: Fix da8xx GPIO indexing over GPIO 32

The GPIO banks are broken up into two 16-bit registers for each
bank set.  Unfortunately, the math that determines how to shift
blindly shifted by the number of the gpio.  This worked for gpio
numbers under 32, but higher gpio's are broken.  This fixes the
gpio index, so the bank is passed and the shift amount within
the register is passed now instead of the gpio number.

Fixes: b36a8947348c("dm: gpio: Add DM compatibility to
GPIO driver for Davinci")

Signed-off-by: Adam Ford <aford173@gmail.com>
drivers/gpio/da8xx_gpio.c