]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:52:27 +0000 (09:52 +0200)
commit60bc55dea8053f69cf3677adcc7a23f94e4b3c5c
tree50377fd3443f980d1f994833ac51db01454b5cac
parent3d76f277b103354de038ab1c5ec2d1d7a9a579d7
i2c: pca-platform: Fix GPIO lookup code

[ 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>
drivers/i2c/busses/i2c-pca-platform.c