summaryrefslogtreecommitdiffstats
path: root/sys/arm/nvidia
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2016-05-10 20:02:03 +0000
committergonzo <gonzo@FreeBSD.org>2016-05-10 20:02:03 +0000
commitb05aea41fa236129a4433cc26855c0a8304c3453 (patch)
treec66b535756122599a766f1d6a76649459ca1b994 /sys/arm/nvidia
parentbcdd9068f7d4796fcbb070ced9fd2e9d081534f2 (diff)
downloadFreeBSD-src-b05aea41fa236129a4433cc26855c0a8304c3453.zip
FreeBSD-src-b05aea41fa236129a4433cc26855c0a8304c3453.tar.gz
Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API
Current API assumes that "gpios" property belongs to the device's node but for some binding it's not true: gpiokeys has set of child nodes with this property. Patch adds new argument instead of replacing device_t because device_t will be used to track ownership for allocated pins Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D6277
Diffstat (limited to 'sys/arm/nvidia')
-rw-r--r--sys/arm/nvidia/tegra_sdhci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c
index e2ec063..d01f1ad 100644
--- a/sys/arm/nvidia/tegra_sdhci.c
+++ b/sys/arm/nvidia/tegra_sdhci.c
@@ -300,9 +300,9 @@ tegra_sdhci_attach(device_t dev)
goto fail;
}
- gpio_pin_get_by_ofw_property(sc->dev, "cd-gpios", &sc->gpio_cd);
- gpio_pin_get_by_ofw_property(sc->dev, "power-gpios", &sc->gpio_power);
- gpio_pin_get_by_ofw_property(sc->dev, "wp-gpios", &sc->gpio_wp);
+ gpio_pin_get_by_ofw_property(sc->dev, node, "cd-gpios", &sc->gpio_cd);
+ gpio_pin_get_by_ofw_property(sc->dev, node, "power-gpios", &sc->gpio_power);
+ gpio_pin_get_by_ofw_property(sc->dev, node, "wp-gpios", &sc->gpio_wp);
rv = clk_get_by_ofw_index(dev, 0, &sc->clk);
if (rv != 0) {
OpenPOWER on IntegriCloud