Writing Device Drivers

Retrieving Target Device Property Values

This section describes LDI interfaces that kernel device consumers can use to retrieve property information about a specified target device. A target device is specified by a layered driver handle. A kernel device consumer can receive values and addresses of properties and determine whether a property exists.

ldi_prop_exists(9F)

Return 1 if the property exists for the target device specified by the layered driver handle. Return 0 if the property does not exist for the specified target device.

ldi_prop_get_int(9F)

Search for an int integer property that is associated with the target device specified by the layered driver handle. If the integer property is found, return the property value.

ldi_prop_get_int64(9F)

Search for an int64_t integer property that is associated with the target device specified by the layered driver handle. If the integer property is found, return the property value.

ldi_prop_lookup_int_array(9F)

Retrieve the address of an int integer array property value for the target device specified by the layered driver handle.

ldi_prop_lookup_int64_array(9F)

Retrieve the address of an int64_t integer array property value for the target device specified by the layered driver handle.

ldi_prop_lookup_string(9F)

Retrieve the address of a null-terminated string property value for the target device specified by the layered driver handle.

ldi_prop_lookup_string_array(9F)

Retrieve the address of an array of strings. The string array is an array of pointers to null-terminated strings of property values for the target device specified by the layered driver handle.

ldi_prop_lookup_byte_array(9F)

Retrieve the address of an array of bytes. The byte array is a property value of the target device specified by the layered driver handle.