DEVICE_GET_PROPERTY(9)

NAME
device_get_property, device_has_property - access device specific data

SYNOPSIS
#include <sys/param.h>
#include <sys/bus.h>
ssize_t
device_get_property(device_t dev, const char *prop, void *val, size_t sz);
bool
device_has_property(device_t dev, const char *prop);

DESCRIPTION
Access device specific data provided by the parent bus. Drivers can use these properties to obtain device capabilities and set necessary quirks.

NOTES
You can pass NULL as pointer to property's value when calling device_get_property() to obtain its size.

Currently this interface is implemented by simplebus(4) and acpi(4).

RETURN VALUES
device_get_property() if successful returns property's size, otherwise returns -1.

device_has_property() returns true if given property was found.

SEE ALSO
acpi(4), simplebus(4), device(9)

AUTHORS
This manual page was written by Bartlomiej Grzesik.