pinctrl: tegra: Use correct offset for pin group
authorPrathamesh Shete <pshete@nvidia.com>
Mon, 25 Oct 2021 11:09:59 +0000 (16:39 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Oct 2021 23:27:39 +0000 (01:27 +0200)
commita42c7d95d29ec1d57511e87793ea1fa4ad41984d
tree04df9a747cbf58016650e0043b21367f3c03c7cc
parentc7892ae13e461ed20154321eb792e07ebe38f5b3
pinctrl: tegra: Use correct offset for pin group

Function tegra_pinctrl_gpio_request_enable() and
tegra_pinctrl_gpio_disable_free() uses pin offset instead
of group offset, causing the driver to use wrong offset
to enable gpio.

Add a helper function tegra_pinctrl_get_group() to parse the
pin group and determine correct offset.

Signed-off-by: Kartik K <kkartik@nvidia.com>
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Link: https://lore.kernel.org/r/20211025110959.27751-1-pshete@nvidia.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/tegra/pinctrl-tegra.c