sdioemb_func_driver Struct Reference
[SDIO function driver API]

#include <sdio_api.h>


Data Fields

const char * name
struct sdioemb_id_tableid_table
int(* probe )(struct sdioemb_dev *fdev)
void(* remove )(struct sdioemb_dev *fdev)
void(* card_int_handler )(struct sdioemb_dev *fdev)
void(* suspend )(struct sdioemb_dev *fdev)
void(* resume )(struct sdioemb_dev *fdev)


Detailed Description

A driver for an SDIO function.

Field Documentation

Driver name used in diagnostics.

Referenced by sdioemb_driver_register(), and sdioemb_driver_unregister().

0 terminated array of functions supported by this device.

The driver may (for example) match on a number of vendor ID/device ID/function number triplets or on an SDIO standard interface.

Called by the core when an inserted card has functions which match those listed in id_table.

The driver's implementation should (if required):

  • perform any additional probing
  • do function specific initialization
  • allocate and register any function/OS specific devices or interfaces.

Called in: thread context.

Parameters:
fdev the newly inserted device.
Returns:
0 on success; -ve on error.

Called by the core when a card is removed. This is only called if the probe() call succeeded.

The driver's implementation should (if required);

  • do any function specific shutdown.
  • cleanup any data structures created/registers during probe().

Called in: thread context.

Parameters:
fdev the device being removed.

Called by the core to signal an SDIO interrupt for this card occurs, if interrupts have been enabled with sdioemb_interrupt_enable().

The driver's implementation should signal a thread (or similar) to actually handle the interrupt as no card I/O may be performed whilst in interrupt context. When the interrupt is handled, the driver should call sdioemb_interrupt_acknowledge() to enable further interrupts to be signalled.

Called in: interrupt context.

Parameters:
fdev the device which may have raised the interrupt.

Referenced by sdioemb_interrupt().

Called by the core to signal a suspend power management event occured.

The driver's implementation should (if required) set the card to a low power mode and return as soon as possible. After this function returns, the driver should not start any SDIO commands.

Called in: thread context.

Parameters:
fdev the device handler.

Called by the core to signal a resume power management event occured.

The driver's implementation should (if required) initialise the card to an operational mode and return as soon as possible. If the card has been powered off during suspend, the driver would have to initialise the card from scratch (f/w download, h/w initialisation, etc.).

Called in: thread context.

Parameters:
fdev the device handler.


The documentation for this struct was generated from the following file:

Generated on Wed Oct 27 15:18:12 2010 for sdioemb by  doxygen 1.5.5