summaryrefslogtreecommitdiffstats
path: root/sys/dev/gpio/gpio_if.m
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/gpio/gpio_if.m')
-rw-r--r--sys/dev/gpio/gpio_if.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/gpio/gpio_if.m b/sys/dev/gpio/gpio_if.m
index adc119e..6306f33 100644
--- a/sys/dev/gpio/gpio_if.m
+++ b/sys/dev/gpio/gpio_if.m
@@ -32,6 +32,13 @@
INTERFACE gpio;
CODE {
+ static device_t
+ gpio_default_get_bus(void)
+ {
+
+ return (NULL);
+ }
+
static int
gpio_default_map_gpios(device_t bus, phandle_t dev,
phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin,
@@ -56,6 +63,13 @@ HEADER {
};
#
+# Return the gpiobus device reference
+#
+METHOD device_t get_bus {
+ device_t dev;
+} DEFAULT gpio_default_get_bus;
+
+#
# Get maximum pin number
#
METHOD int pin_max {
OpenPOWER on IntegriCloud