Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | sdio_func_tuple |
struct | sdio_func |
struct | sdio_driver |
Macros | |
#define | SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ |
#define | sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT) |
#define | sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) |
#define | sdio_func_id(f) (dev_name(&(f)->dev)) |
#define | sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) |
#define | sdio_set_drvdata(f, d) dev_set_drvdata(&(f)->dev, d) |
#define | dev_to_sdio_func(d) container_of(d, struct sdio_func, dev) |
#define | to_sdio_driver(d) container_of(d, struct sdio_driver, drv) |
#define | SDIO_DEVICE(vend, dev) |
#define | SDIO_DEVICE_CLASS(dev_class) |
Typedefs | |
typedef void( | sdio_irq_handler_t )(struct sdio_func *) |
Definition at line 72 of file sdio_func.h.
SDIO_DEVICE - macro used to describe a specific SDIO device : the 16 bit manufacturer code : the 16 bit function id
This macro is used to create a struct sdio_device_id that matches a specific device. The class field will be set to SDIO_ANY_ID.
Definition at line 97 of file sdio_func.h.
#define SDIO_DEVICE_CLASS | ( | dev_class | ) |
SDIO_DEVICE_CLASS - macro used to describe a specific SDIO device class : the 8 bit standard interface code
This macro is used to create a struct sdio_device_id that matches a specific standard SDIO function type. The vendor and device fields will be set to SDIO_ANY_ID.
Definition at line 109 of file sdio_func.h.
Definition at line 68 of file sdio_func.h.
#define sdio_func_present | ( | f | ) | ((f)->state & SDIO_STATE_PRESENT) |
Definition at line 64 of file sdio_func.h.
#define sdio_func_set_present | ( | f | ) | ((f)->state |= SDIO_STATE_PRESENT) |
Definition at line 66 of file sdio_func.h.
#define sdio_get_drvdata | ( | f | ) | dev_get_drvdata(&(f)->dev) |
Definition at line 70 of file sdio_func.h.
Definition at line 71 of file sdio_func.h.
#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ |
Definition at line 54 of file sdio_func.h.
#define to_sdio_driver | ( | d | ) | container_of(d, struct sdio_driver, drv) |
Definition at line 87 of file sdio_func.h.
Definition at line 23 of file sdio_func.h.
sdio_align_size - pads a transfer size to a more optimal value : SDIO function : original transfer size
Pads the original data size with a number of extra bytes in order to avoid controller bugs and/or performance hits (e.g. some controllers revert to PIO for certain sizes).
If possible, it will also adjust the size so that it can be handled in just a single request.
Returns the improved size, which might be unmodified.
int sdio_claim_irq | ( | struct sdio_func * | func, |
sdio_irq_handler_t * | handler | ||
) |
sdio_claim_irq - claim the IRQ for a SDIO function : SDIO function : IRQ handler callback
Claim and activate the IRQ for the given SDIO function. The provided handler will be called when that IRQ is asserted. The host is always claimed already when the handler is called so the handler must not call sdio_claim_host() nor sdio_release_host().
Definition at line 238 of file sdio_irq.c.
sdio_f0_writeb - write a single byte to SDIO function 0 : an SDIO function of the card : byte to write : address to write to : optional status value from transfer
Writes a single byte to the address space of SDIO function 0. will contain the status of the actual transfer.
Only writes to the vendor specific CCCR registers (0xF0 - 0xFF) are permiited; will be set to -EINVAL for * writes outside this range.
mmc_pm_flag_t sdio_get_host_pm_caps | ( | struct sdio_func * | func | ) |
sdio_get_host_pm_caps - get host power management capabilities : SDIO function attached to host
Returns a capability bitmask corresponding to power management features supported by the host controller that the card function might rely upon during a system suspend. The host doesn't need to be claimed, nor the function active, for this information to be obtained.
sdio_readl - read a 32 bit integer from a SDIO function : SDIO function to access : address to read : optional status value from transfer
Reads a 32 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffffffff is returned and will contain the error code.
sdio_readw - read a 16 bit integer from a SDIO function : SDIO function to access : address to read : optional status value from transfer
Reads a 16 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffff is returned and will contain the error code.
int sdio_register_driver | ( | struct sdio_driver * | drv | ) |
sdio_register_driver - register a function driver : SDIO function driver
Definition at line 236 of file sdio_bus.c.
sdio_release_irq - release the IRQ for a SDIO function : SDIO function
Disable and release the IRQ for the given SDIO function.
Definition at line 281 of file sdio_irq.c.
sdio_set_block_size - set the block size of an SDIO function : SDIO function to change : new block size or 0 to use the default.
The default block size is the largest supported by both the function and the host, with a maximum of 512 to ensure that arbitrarily sized data transfer use the optimal (least) number of commands.
A driver may call this to override the default block size set by the core. This can be used to set a block size greater than the maximum that reported by the card; it is the driver's responsibility to ensure it uses a value that the card supports.
Returns 0 on success, -EINVAL if the host does not support the requested block size, or -EIO (etc.) if one of the resultant FBR block size register writes failed.
int sdio_set_host_pm_flags | ( | struct sdio_func * | func, |
mmc_pm_flag_t | flags | ||
) |
sdio_set_host_pm_flags - set wanted host power management capabilities : SDIO function attached to host
Set a capability bitmask corresponding to wanted host controller power management features for the upcoming suspend state. This must be called, if needed, each time the suspend method of the function driver is called, and must contain only bits that were returned by sdio_get_host_pm_caps(). The host doesn't need to be claimed, nor the function active, for this information to be set.
void sdio_unregister_driver | ( | struct sdio_driver * | drv | ) |
sdio_unregister_driver - unregister a function driver : SDIO function driver
Definition at line 248 of file sdio_bus.c.
sdio_writeb_readb - write and read a byte from SDIO function : SDIO function to access : byte to write : address to write to : optional status value from transfer
Performs a RAW (Read after Write) operation as defined by SDIO spec - single byte is written to address space of a given SDIO function and response is read back from the same address, both using single request. If there is a problem with the operation, 0xff is returned and will contain the error code.