aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tifm.h
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2006-12-08 00:50:51 -0500
committerPierre Ossman <drzeus@drzeus.cx>2007-02-04 14:54:07 -0500
commit8e02f8581cd2f9c12a03be7641d5c2c427170feb (patch)
treeeef042716811ef6dcb15be51352a2405a6cc4a96 /include/linux/tifm.h
parent83d420ba92bdd52127e4548ae8050a48f655ce3b (diff)
tifm_sd: restructure initialization, removal and command handling
In order to support correct suspend and resume several changes were needed: 1. Switch from work_struct to tasklet for command handling. When device suspend is called workqueues are already frozen and can not be used. 2. Separate host initialization code from driver's probe and don't rely on interrupts for host initialization. This, in turn, addresses two problems: a) Resume needs to re-initialize the host, but can not assume that device interrupts were already re-armed. b) Previously, probe will return successfully before really knowing the state of the host, as host interrupts were not armed in time. Now it uses polling to determine the real host state before returning. 3. Separate termination code from driver's remove. Termination may be caused by resume, if media changed type or became unavailable during suspend. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/tifm.h')
-rw-r--r--include/linux/tifm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/tifm.h b/include/linux/tifm.h
index dfb8052eee5e..9caa28e2a63c 100644
--- a/include/linux/tifm.h
+++ b/include/linux/tifm.h
@@ -89,8 +89,7 @@ struct tifm_dev {
89 char __iomem *addr; 89 char __iomem *addr;
90 spinlock_t lock; 90 spinlock_t lock;
91 tifm_media_id media_id; 91 tifm_media_id media_id;
92 char wq_name[KOBJ_NAME_LEN]; 92 unsigned int socket_id;
93 struct workqueue_struct *wq;
94 93
95 unsigned int (*signal_irq)(struct tifm_dev *sock, 94 unsigned int (*signal_irq)(struct tifm_dev *sock,
96 unsigned int sock_irq_status); 95 unsigned int sock_irq_status);
@@ -132,7 +131,7 @@ void tifm_free_device(struct device *dev);
132void tifm_free_adapter(struct tifm_adapter *fm); 131void tifm_free_adapter(struct tifm_adapter *fm);
133int tifm_add_adapter(struct tifm_adapter *fm); 132int tifm_add_adapter(struct tifm_adapter *fm);
134void tifm_remove_adapter(struct tifm_adapter *fm); 133void tifm_remove_adapter(struct tifm_adapter *fm);
135struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id); 134struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm);
136int tifm_register_driver(struct tifm_driver *drv); 135int tifm_register_driver(struct tifm_driver *drv);
137void tifm_unregister_driver(struct tifm_driver *drv); 136void tifm_unregister_driver(struct tifm_driver *drv);
138void tifm_eject(struct tifm_dev *sock); 137void tifm_eject(struct tifm_dev *sock);