Lines Matching refs:socket
92 struct pcmcia_socket *socket = dev_get_drvdata(dev); in pcmcia_release_socket() local
94 complete(&socket->socket_released); in pcmcia_release_socket()
103 int pcmcia_register_socket(struct pcmcia_socket *socket) in pcmcia_register_socket() argument
108 if (!socket || !socket->ops || !socket->dev.parent || !socket->resource_ops) in pcmcia_register_socket()
111 dev_dbg(&socket->dev, "pcmcia_register_socket(0x%p)\n", socket->ops); in pcmcia_register_socket()
119 socket->sock = 0; in pcmcia_register_socket()
131 socket->sock = i - 1; in pcmcia_register_socket()
133 list_add_tail(&socket->socket_list, &pcmcia_socket_list); in pcmcia_register_socket()
141 socket->features &= ~SS_CAP_CARDBUS; in pcmcia_register_socket()
145 dev_set_drvdata(&socket->dev, socket); in pcmcia_register_socket()
146 socket->dev.class = &pcmcia_socket_class; in pcmcia_register_socket()
147 dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock); in pcmcia_register_socket()
150 socket->cis_mem.flags = 0; in pcmcia_register_socket()
151 socket->cis_mem.speed = cis_speed; in pcmcia_register_socket()
153 INIT_LIST_HEAD(&socket->cis_cache); in pcmcia_register_socket()
155 init_completion(&socket->socket_released); in pcmcia_register_socket()
156 init_completion(&socket->thread_done); in pcmcia_register_socket()
157 mutex_init(&socket->skt_mutex); in pcmcia_register_socket()
158 mutex_init(&socket->ops_mutex); in pcmcia_register_socket()
159 spin_lock_init(&socket->thread_lock); in pcmcia_register_socket()
161 if (socket->resource_ops->init) { in pcmcia_register_socket()
162 mutex_lock(&socket->ops_mutex); in pcmcia_register_socket()
163 ret = socket->resource_ops->init(socket); in pcmcia_register_socket()
164 mutex_unlock(&socket->ops_mutex); in pcmcia_register_socket()
169 tsk = kthread_run(pccardd, socket, "pccardd"); in pcmcia_register_socket()
175 wait_for_completion(&socket->thread_done); in pcmcia_register_socket()
176 if (!socket->thread) { in pcmcia_register_socket()
177 dev_warn(&socket->dev, in pcmcia_register_socket()
182 pcmcia_parse_events(socket, SS_DETECT); in pcmcia_register_socket()
195 list_del(&socket->socket_list); in pcmcia_register_socket()
206 void pcmcia_unregister_socket(struct pcmcia_socket *socket) in pcmcia_unregister_socket() argument
208 if (!socket) in pcmcia_unregister_socket()
211 dev_dbg(&socket->dev, "pcmcia_unregister_socket(0x%p)\n", socket->ops); in pcmcia_unregister_socket()
213 if (socket->thread) in pcmcia_unregister_socket()
214 kthread_stop(socket->thread); in pcmcia_unregister_socket()
218 list_del(&socket->socket_list); in pcmcia_unregister_socket()
222 if (socket->resource_ops->exit) { in pcmcia_unregister_socket()
223 mutex_lock(&socket->ops_mutex); in pcmcia_unregister_socket()
224 socket->resource_ops->exit(socket); in pcmcia_unregister_socket()
225 mutex_unlock(&socket->ops_mutex); in pcmcia_unregister_socket()
227 wait_for_completion(&socket->socket_released); in pcmcia_unregister_socket()
255 skt->socket.flags |= SS_OUTPUT_ENA | SS_RESET; in socket_reset()
256 skt->ops->set_socket(skt, &skt->socket); in socket_reset()
259 skt->socket.flags &= ~SS_RESET; in socket_reset()
260 skt->ops->set_socket(skt, &skt->socket); in socket_reset()
300 s->socket = dead_socket; in socket_shutdown()
302 s->ops->set_socket(s, &s->socket); in socket_shutdown()
373 skt->socket.Vcc = skt->socket.Vpp = 33; in socket_setup()
375 skt->socket.Vcc = skt->socket.Vpp = 50; in socket_setup()
384 skt->socket.flags = 0; in socket_setup()
385 skt->ops->set_socket(skt, &skt->socket); in socket_setup()
460 skt->socket = dead_socket; in socket_suspend()
461 skt->ops->set_socket(skt, &skt->socket); in socket_suspend()
473 skt->socket = dead_socket; in socket_early_resume()
475 skt->ops->set_socket(skt, &skt->socket); in socket_early_resume()
598 skt->socket = dead_socket; in pccardd()
600 skt->ops->set_socket(skt, &skt->socket); in pccardd()