ARM: davinci: fix GPIO lookup for I2C
authorSekhar Nori <nsekhar@ti.com>
Wed, 18 Apr 2018 09:32:46 +0000 (15:02 +0530)
committerSekhar Nori <nsekhar@ti.com>
Wed, 2 May 2018 09:25:06 +0000 (14:55 +0530)
commit9411ac07cd764be34bbd7ff09125a6b7b9175d4c
tree6234e28e7d99c2d1c556e9a9ded92a1f182e5bfa
parent5c054de228dd6d97bf8e38962bd118953b66e5a0
ARM: davinci: fix GPIO lookup for I2C

The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
I2C can correctly lookup the recovery gpios.

Note that it is the gpio-davinci driver that sets the gpiochip label to
davinci_gpio.0.

Also, the I2C device uses an id of 1 on DM644x and DM355.

While at it, convert to using GPIO_TO_PIN() for referring to GPIO pin
numbers, like it is done in rest of the board support files.

Fixes: e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery")
Reviewed-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c