2 * include/linux/mmc/sdio_func.h
4 * Copyright 2007 Pierre Ossman
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
12 #ifndef MMC_SDIO_FUNC_H
13 #define MMC_SDIO_FUNC_H
18 * SDIO function devices
21 struct mmc_card *card; /* the card this device belongs to */
22 struct device dev; /* the device */
23 unsigned int num; /* function number */
24 unsigned int state; /* function state */
25 #define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
28 #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT)
30 #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT)
32 #define sdio_func_id(f) ((f)->dev.bus_id)
34 #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev)
35 #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d)
38 * SDIO function device driver
43 int (*probe)(struct sdio_func *);
44 void (*remove)(struct sdio_func *);
46 struct device_driver drv;
49 extern int sdio_register_driver(struct sdio_driver *);
50 extern void sdio_unregister_driver(struct sdio_driver *);