pinctrl: core: Show pin numbers for the controllers with base = 0
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 15 Apr 2021 13:03:56 +0000 (16:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Apr 2021 11:39:59 +0000 (13:39 +0200)
commit83d93d05376a807e0fccc60788193ced671fbf40
tree5c55b6ce47ab9ddfe18d2d3fdcf2218fa027af4f
parentfc2454cc0c4bbf3ab7556c8b38e042c6c7651e42
pinctrl: core: Show pin numbers for the controllers with base = 0

[ Upstream commit 482715ff0601c836152b792f06c353464d826b9b ]

The commit f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file")
enabled GPIO pin number and label in debugfs for pin controller. However,
it limited that feature to the chips where base is positive number. This,
in particular, excluded chips where base is 0 for the historical or backward
compatibility reasons. Refactor the code to include the latter as well.

Fixes: f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file")
Cc: Drew Fustini <drew@beagleboard.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Drew Fustini <drew@beagleboard.org>
Reviewed-by: Drew Fustini <drew@beagleboard.org>
Link: https://lore.kernel.org/r/20210415130356.15885-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/core.c