From: Christophe Milard <christophe.mil...@linaro.org> Needed to delete the resources needed for the devio. That is possibly the memory allocated for its "ops" part if it was allocated. May be NULL if nothing needs to be done at devio deletion time.
Signed-off-by: Christophe Milard <christophe.mil...@linaro.org> --- /** Email created from pull request 16 (heyi-linaro:driver-framework) ** https://github.com/Linaro/odp/pull/16 ** Patch: https://github.com/Linaro/odp/pull/16.patch ** Base sha: bac3806356694060d30bf3c83e4133410fecd9ab ** Merge commit sha: 8038f288f85db54e1a242e91ded59675313317bf **/ include/odp/drv/spec/driver.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h index e861396..f89c282 100644 --- a/include/odp/drv/spec/driver.h +++ b/include/odp/drv/spec/driver.h @@ -269,6 +269,24 @@ struct odpdrv_devio_param_t { char enumr_api_name[ODPDRV_NAME_SIZE]; uint32_t enumr_api_version; /**<< required enumerator API version */ + /** Probe function: + * Tell whether this devio can handle the given device. + * The devio is hence given a chance to reject a given device for + * any reason. No binding occurs here. binding occurs when the + * driver is probed. + * returns 0 if this devio can handle the given device, or a negative + * value if not. + * If left to NULL, a 0 returned value is assumed + */ + int (*probe)(odpdrv_device_t dev); + + /** Remove function: + * Should destroy the memory allocated for ops and anything else + * under it, or any resource for this devio. + * Returns 0 on success or a negative value on error. + */ + int (*remove)(void); + /** Ops * Pointer to a devio ops structure (specific to each devio) */