mmc: basic SDIO device model
Add the sdio bus type and basic device handling. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
35
include/linux/mmc/sdio_func.h
Normal file
35
include/linux/mmc/sdio_func.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* include/linux/mmc/sdio_func.h
|
||||
*
|
||||
* Copyright 2007 Pierre Ossman
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef MMC_SDIO_FUNC_H
|
||||
#define MMC_SDIO_FUNC_H
|
||||
|
||||
struct mmc_card;
|
||||
|
||||
/*
|
||||
* SDIO function devices
|
||||
*/
|
||||
struct sdio_func {
|
||||
struct mmc_card *card; /* the card this device belongs to */
|
||||
struct device dev; /* the device */
|
||||
unsigned int num; /* function number */
|
||||
unsigned int state; /* function state */
|
||||
#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) ((f)->dev.bus_id)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user