]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: pca-platform: Fix GPIO lookup code
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 30 May 2019 20:24:24 +0000 (22:24 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit500b538f8f43d150e6faa4f58efa30742c66429f
tree124002c2353bdf7647a59f51d36a67e6dec5f38e
parentb6d4f0597388347cd72a38e8f6e02b7b93eae10b
i2c: pca-platform: Fix GPIO lookup code

BugLink: https://bugs.launchpad.net/bugs/1838824
[ Upstream commit a0cac264a86fbf4d6cb201fbbb73c1d335e3248a ]

The devm_gpiod_request_gpiod() call will add "-gpios" to
any passed connection ID before looking it up.

I do not think the reset GPIO on this platform is named
"reset-gpios-gpios" but rather "reset-gpios" in the device
tree, so fix this up so that we get a proper reset GPIO
handle.

Also drop the inclusion of the legacy GPIO header.

Fixes: 0e8ce93bdceb ("i2c: pca-platform: add devicetree awareness")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/i2c/busses/i2c-pca-platform.c