summaryrefslogtreecommitdiff
path: root/drivers/gpio/sandbox_test.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-09-27 11:09:23 -0400
committerTom Rini <trini@konsulko.com>2021-09-27 11:09:23 -0400
commit1d1f98c8eed7bb4792300e655c2cb70136928f74 (patch)
treed08df140d52bd1298fa0e81ce908e2e09a880e5d /drivers/gpio/sandbox_test.c
parente908d20fcbd847e17345591fc171b59d9a156516 (diff)
parent933bf2644591281ed96f9d5771cbb35fe95bcb00 (diff)
Merge tag 'dm-pull-next-27sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Various of-platdata improvements, including CONFIG_OF_REAL
Diffstat (limited to 'drivers/gpio/sandbox_test.c')
-rw-r--r--drivers/gpio/sandbox_test.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpio/sandbox_test.c b/drivers/gpio/sandbox_test.c
new file mode 100644
index 00000000000..c76e1997419
--- /dev/null
+++ b/drivers/gpio/sandbox_test.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Sandbox driver for testing GPIOs with of-platdata
+ *
+ * Copyright 2021 Google LLC
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <asm-generic/gpio.h>
+
+static const struct udevice_id sandbox_gpio_test_ids[] = {
+ { .compatible = "sandbox,gpio-test" },
+ { }
+};
+
+U_BOOT_DRIVER(sandbox_gpio_test) = {
+ .name = "sandbox_gpio_test",
+ .id = UCLASS_MISC,
+ .of_match = sandbox_gpio_test_ids,
+};