RTEMS CPU Kit with SuperCore
4.11.2
|
Functions | |
int | drvmgr_keys_get (struct drvmgr_dev *dev, struct drvmgr_key **keys) |
Find all the resource keys for a device among all driver resources on a bus. More... | |
struct drvmgr_key * | drvmgr_key_get (struct drvmgr_key *keys, char *key_name) |
Return the one key that matches key name from a driver keys array. More... | |
union drvmgr_key_value * | drvmgr_key_val_get (struct drvmgr_key *keys, char *key_name, enum drvmgr_kt key_type) |
Extract key value from the key in the keys array matching name and type. More... | |
union drvmgr_key_value * | drvmgr_dev_key_get (struct drvmgr_dev *dev, char *key_name, enum drvmgr_kt key_type) |
Get key value from the bus resources matching [device, key name, key type] if no matching key is found NULL is returned. More... | |
union drvmgr_key_value* drvmgr_dev_key_get | ( | struct drvmgr_dev * | dev, |
char * | key_name, | ||
enum drvmgr_kt | key_type | ||
) |
Get key value from the bus resources matching [device, key name, key type] if no matching key is found NULL is returned.
This is typically used by device drivers to find a particular device resource.
dev | The device to search resource for. |
key_name | The key name to search for |
key_type | The key type expected. |
References drvmgr_key_val_get(), and drvmgr_keys_get().
struct drvmgr_key* drvmgr_key_get | ( | struct drvmgr_key * | keys, |
char * | key_name | ||
) |
Return the one key that matches key name from a driver keys array.
The keys can be obtained using drvmgr_keys_get().
keys | An array of keys ended with DRVMGR_KEY_EMPTY to search among. |
key_name | Name of key to search for among the keys. |
Referenced by drvmgr_key_val_get(), and drvmgr_keys_get().
union drvmgr_key_value* drvmgr_key_val_get | ( | struct drvmgr_key * | keys, |
char * | key_name, | ||
enum drvmgr_kt | key_type | ||
) |
Extract key value from the key in the keys array matching name and type.
This function calls drvmgr_keys_get to get the key requested (from key name), then determines if the type is correct. A pointer to the key value is returned.
keys | An array of keys ended with DRVMGR_KEY_EMPTY to search among. |
key_name | Name of key to search for among the keys. |
key_type | Data Type of value. INTEGER, ADDRESS, STRING. |
References drvmgr_key_get().
Referenced by drvmgr_dev_key_get().
int drvmgr_keys_get | ( | struct drvmgr_dev * | dev, |
struct drvmgr_key ** | keys | ||
) |
Find all the resource keys for a device among all driver resources on a bus.
Typically used by a device driver to get configuration options.
dev | Device to find resources for |
key | Location where the pointer to the driver resource array (drvmgr_drv_res->keys) is stored. |
References drvmgr_dev::drv, drvmgr_drv_res::drv_id, drvmgr_drv::drv_id, drvmgr_key_get(), drvmgr_drv_res::keys, drvmgr_drv_res::minor_bus, drvmgr_dev::minor_bus, drvmgr_bus_res::next, drvmgr_dev::parent, drvmgr_bus::reslist, and drvmgr_bus_res::resource.
Referenced by drvmgr_dev_key_get().