Skip to content

Commit 16e3f40

Browse files
dtorLorenzo Pieralisi
authored andcommitted
PCI: tegra: Switch to using devm_fwnode_gpiod_get
[devm_]gpiod_get_from_of_node in drivers usage should be limited so that gpiolib can be cleaned up; let's switch to the generic device property API. It may even help with handling secondary fwnodes when gpiolib is taught to handle gpios described by swnodes. Link: https://lore.kernel.org/r/20220903-gpiod_get_from_of_node-remove-v1-1-b29adfb27a6c@gmail.com Signed-off-by: Dmitry Torokhov <[email protected]> [[email protected]: commit log] Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
1 parent 9abf231 commit 16e3f40

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/pci/controller/pci-tegra.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,10 +2197,11 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)
21972197
* and in this case fall back to using AFI per port register
21982198
* to toggle PERST# SFIO line.
21992199
*/
2200-
rp->reset_gpio = devm_gpiod_get_from_of_node(dev, port,
2201-
"reset-gpios", 0,
2202-
GPIOD_OUT_LOW,
2203-
label);
2200+
rp->reset_gpio = devm_fwnode_gpiod_get(dev,
2201+
of_fwnode_handle(port),
2202+
"reset",
2203+
GPIOD_OUT_LOW,
2204+
label);
22042205
if (IS_ERR(rp->reset_gpio)) {
22052206
if (PTR_ERR(rp->reset_gpio) == -ENOENT) {
22062207
rp->reset_gpio = NULL;

0 commit comments

Comments
 (0)