#include <slot_api.h>
Data Fields | |
int(* | add_function )(struct sdioemb_slot *slot, struct sdioemb_dev *fdev) |
void(* | del_function )(struct sdioemb_slot *slot, struct sdioemb_dev *fdev) |
A slot driver may be notified when certain slot or card events occur.
int(* sdioemb_slot_notifiers::add_function)(struct sdioemb_slot *slot, struct sdioemb_dev *fdev) |
This is called when a card function has been enumerated and initialized but before can be bound to a function driver.
A slot driver may use this to create an OS-specific object for the function. The slot driver must either (a) return SDIOEMB_ADD_FUNC_NOW; (b) return SDIOEMB_ADD_FUNC_DEFERRED and call sdioemb_add_function() later on; (c) return SDIOEMB_ADD_FUNC_DEFERRED and pass the fdev to the function driver for it to call sdioemb_driver_probe() directly; or (d) return an error.
The slot driver may need to get a reference to the fdev with sdioemb_get_function() if the lifetime of the OS-specific object extends beyond the subsequent return of the del_function() callback.
If this is non-NULL the slot driver must also provide del_function().
slot | the SDIO slot producing the notification. | |
fdev | the SDIO function being added. |
SDIOEMB_ADD_FUNC_DEFERRED if sdioemb_add_function() or sdioemb_driver_probe() will be called later.
-ve on a error.
Referenced by sdioemb_wdf_slot_register().
void(* sdioemb_slot_notifiers::del_function)(struct sdioemb_slot *slot, struct sdioemb_dev *fdev) |
This is called when a card function is being removed and after any function driver has been unbound.
A slot driver may use this to delete any OS-specific object created by the add_function() notifier.
slot | the SDIO slot producing the notification. | |
fdev | the SDIO function being deleted. |
Referenced by sdioemb_wdf_slot_register().