Lines Matching refs:socket
242 pcmcia_put_socket(p_dev->socket); in pcmcia_release_dev()
265 s = p_dev->socket; in pcmcia_device_probe()
276 ret = pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_CONFIG, in pcmcia_device_probe()
304 (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) in pcmcia_device_probe()
368 if ((p_dev->socket->pcmcia_pfc) && in pcmcia_device_remove()
369 (p_dev->socket->device_count > 0) && in pcmcia_device_remove()
371 pcmcia_card_remove(p_dev->socket, p_dev); in pcmcia_device_remove()
409 if (!pccard_read_tuple(p_dev->socket, BIND_FN_ALL, in pcmcia_device_query()
411 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
416 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
419 if (!pccard_read_tuple(p_dev->socket, p_dev->func, in pcmcia_device_query()
421 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
424 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
436 if (!pccard_read_tuple(p_dev->socket, p_dev->func, in pcmcia_device_query()
441 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
444 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
449 if (!pccard_read_tuple(p_dev->socket, BIND_FN_ALL, CISTPL_VERS_1, in pcmcia_device_query()
451 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
471 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_device_query()
507 p_dev->socket = s; in pcmcia_device_add()
516 dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no); in pcmcia_device_add()
739 struct pcmcia_socket *s = dev->socket; in pcmcia_load_firmware()
844 mutex_lock(&dev->socket->ops_mutex); in pcmcia_devmatch()
845 dev->socket->pcmcia_pfc = 1; in pcmcia_devmatch()
846 mutex_unlock(&dev->socket->ops_mutex); in pcmcia_devmatch()
859 if (dev->socket->pcmcia_pfc) in pcmcia_devmatch()
868 mutex_lock(&dev->socket->ops_mutex); in pcmcia_devmatch()
870 mutex_unlock(&dev->socket->ops_mutex); in pcmcia_devmatch()
881 if (!dev->socket->fake_cis) in pcmcia_devmatch()
948 if (add_uevent_var(env, "SOCKET_NO=%u", p_dev->socket->sock)) in pcmcia_bus_uevent()
1025 return p_dev->socket ? sprintf(buf, "0x%02x\n", p_dev->func) : -ENODEV; in function_show()
1102 mutex_lock(&p_dev->socket->ops_mutex); in allow_func_id_match_store()
1104 mutex_unlock(&p_dev->socket->ops_mutex); in allow_func_id_match_store()
1105 pcmcia_parse_uevents(p_dev->socket, PCMCIA_UEVENT_REQUERY); in allow_func_id_match_store()
1136 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_dev_suspend()
1138 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_dev_suspend()
1142 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_dev_suspend()
1158 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_dev_suspend()
1160 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_dev_suspend()
1181 mutex_lock(&p_dev->socket->ops_mutex); in pcmcia_dev_resume()
1183 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_dev_resume()
1187 mutex_unlock(&p_dev->socket->ops_mutex); in pcmcia_dev_resume()
1217 if (p_dev->socket != skt || p_dev->suspended) in pcmcia_bus_suspend_callback()
1228 if (p_dev->socket != skt || !p_dev->suspended) in pcmcia_bus_resume_callback()
1320 if (atomic_read(&p_dev->socket->present) != 0) in pcmcia_dev_present()
1343 struct pcmcia_socket *socket = dev_get_drvdata(dev); in pcmcia_bus_add_socket() local
1346 socket = pcmcia_get_socket(socket); in pcmcia_bus_add_socket()
1347 if (!socket) { in pcmcia_bus_add_socket()
1355 pcmcia_put_socket(socket); in pcmcia_bus_add_socket()
1359 INIT_LIST_HEAD(&socket->devices_list); in pcmcia_bus_add_socket()
1360 socket->pcmcia_pfc = 0; in pcmcia_bus_add_socket()
1361 socket->device_count = 0; in pcmcia_bus_add_socket()
1362 atomic_set(&socket->present, 0); in pcmcia_bus_add_socket()
1364 ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback); in pcmcia_bus_add_socket()
1367 pcmcia_put_socket(socket); in pcmcia_bus_add_socket()
1377 struct pcmcia_socket *socket = dev_get_drvdata(dev); in pcmcia_bus_remove_socket() local
1379 if (!socket) in pcmcia_bus_remove_socket()
1382 pccard_register_pcmcia(socket, NULL); in pcmcia_bus_remove_socket()
1385 mutex_lock(&socket->skt_mutex); in pcmcia_bus_remove_socket()
1386 pcmcia_card_remove(socket, NULL); in pcmcia_bus_remove_socket()
1387 release_cis_mem(socket); in pcmcia_bus_remove_socket()
1388 mutex_unlock(&socket->skt_mutex); in pcmcia_bus_remove_socket()
1392 pcmcia_put_socket(socket); in pcmcia_bus_remove_socket()