aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/gpio/gpiobusvar.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-03-04 19:47:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-03-04 19:47:33 +0000
commitca65be80fd770188b15b4aecdd245ddbeb7f46ed (patch)
treeb76068543cf8760cf057750c9cd4fdd7ab5834d4 /sys/dev/gpio/gpiobusvar.h
parent4104449570e3e74d77537f3a798fbdd632ad311c (diff)
parentfb64e73880228db0132e7001564d85d5e33a40ea (diff)
downloadsrc-ca65be80fd770188b15b4aecdd245ddbeb7f46ed.tar.gz
src-ca65be80fd770188b15b4aecdd245ddbeb7f46ed.zip
Merge ^/head r279313 through r279595.
Notes
Notes: svn path=/projects/clang360-import/; revision=279596
Diffstat (limited to 'sys/dev/gpio/gpiobusvar.h')
-rw-r--r--sys/dev/gpio/gpiobusvar.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/gpio/gpiobusvar.h b/sys/dev/gpio/gpiobusvar.h
index 4f8443032de2..beffb7faf647 100644
--- a/sys/dev/gpio/gpiobusvar.h
+++ b/sys/dev/gpio/gpiobusvar.h
@@ -71,6 +71,13 @@ struct gpiobus_softc
int *sc_pins_mapped; /* mark mapped pins */
};
+struct gpiobus_pin
+{
+ device_t dev; /* gpio device */
+ uint32_t flags; /* pin flags */
+ uint32_t pin; /* pin number */
+};
+
struct gpiobus_ivar
{
struct resource_list rl; /* isr resource list */
@@ -92,7 +99,8 @@ gpio_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells,
return (GPIO_MAP_GPIOS(bus, dev, gparent, gcells, gpios, pin, flags));
}
-device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t);
+device_t ofw_gpiobus_add_fdt_child(device_t, const char *, phandle_t);
+int ofw_gpiobus_parse_gpios(device_t, char *, struct gpiobus_pin **);
void ofw_gpiobus_register_provider(device_t);
void ofw_gpiobus_unregister_provider(device_t);
#endif
@@ -100,6 +108,9 @@ int gpio_check_flags(uint32_t, uint32_t);
device_t gpiobus_attach_bus(device_t);
int gpiobus_detach_bus(device_t);
int gpiobus_init_softc(device_t);
+int gpiobus_alloc_ivars(struct gpiobus_ivar *);
+void gpiobus_free_ivars(struct gpiobus_ivar *);
+int gpiobus_map_pin(device_t, device_t, uint32_t);
extern driver_t gpiobus_driver;