mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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 <dmitry.torokhov@gmail.com> [lpieralisi@kernel.org: commit log] Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
9abf2313ad
commit
16e3f40779
@ -2197,10 +2197,11 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)
|
||||
* and in this case fall back to using AFI per port register
|
||||
* to toggle PERST# SFIO line.
|
||||
*/
|
||||
rp->reset_gpio = devm_gpiod_get_from_of_node(dev, port,
|
||||
"reset-gpios", 0,
|
||||
GPIOD_OUT_LOW,
|
||||
label);
|
||||
rp->reset_gpio = devm_fwnode_gpiod_get(dev,
|
||||
of_fwnode_handle(port),
|
||||
"reset",
|
||||
GPIOD_OUT_LOW,
|
||||
label);
|
||||
if (IS_ERR(rp->reset_gpio)) {
|
||||
if (PTR_ERR(rp->reset_gpio) == -ENOENT) {
|
||||
rp->reset_gpio = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user