aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-06-16 09:54:55 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-09-23 14:51:27 -0400
commit3b38bea0d976513970f947806b08b9faca418e7a (patch)
treef542a7e3dfe206be4de9f7ca6ebc23d25a196731 /include/linux/mmc
parent26074962e8f547b96614dbe248748ba2a1996ca3 (diff)
sdio: add device id table and matching
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/sdio_func.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 2f2b3c854415..8106d399c414 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -12,6 +12,9 @@
12#ifndef MMC_SDIO_FUNC_H 12#ifndef MMC_SDIO_FUNC_H
13#define MMC_SDIO_FUNC_H 13#define MMC_SDIO_FUNC_H
14 14
15#include <linux/device.h>
16#include <linux/mod_devicetable.h>
17
15struct mmc_card; 18struct mmc_card;
16 19
17/* 20/*
@@ -58,13 +61,38 @@ struct sdio_func {
58 */ 61 */
59struct sdio_driver { 62struct sdio_driver {
60 char *name; 63 char *name;
64 const struct sdio_device_id *id_table;
61 65
62 int (*probe)(struct sdio_func *); 66 int (*probe)(struct sdio_func *, const struct sdio_device_id *);
63 void (*remove)(struct sdio_func *); 67 void (*remove)(struct sdio_func *);
64 68
65 struct device_driver drv; 69 struct device_driver drv;
66}; 70};
67 71
72/**
73 * SDIO_DEVICE - macro used to describe a specific SDIO device
74 * @vend: the 16 bit manufacturer code
75 * @dev: the 16 bit function id
76 *
77 * This macro is used to create a struct sdio_device_id that matches a
78 * specific device. The class field will be set to SDIO_ANY_ID.
79 */
80#define SDIO_DEVICE(vend,dev) \
81 .class = SDIO_ANY_ID, \
82 .vendor = (vend), .device = (dev)
83
84/**
85 * SDIO_DEVICE_CLASS - macro used to describe a specific SDIO device class
86 * @dev_class: the 8 bit standard interface code
87 *
88 * This macro is used to create a struct sdio_device_id that matches a
89 * specific standard SDIO function type. The vendor and device fields will
90 * be set to SDIO_ANY_ID.
91 */
92#define SDIO_DEVICE_CLASS(dev_class) \
93 .class = (dev_class), \
94 .vendor = SDIO_ANY_ID, .device = SDIO_ANY_ID
95
68extern int sdio_register_driver(struct sdio_driver *); 96extern int sdio_register_driver(struct sdio_driver *);
69extern void sdio_unregister_driver(struct sdio_driver *); 97extern void sdio_unregister_driver(struct sdio_driver *);
70 98