Lines Matching refs:smbdev

31 	struct psmouse_smbus_dev *smbdev;  in psmouse_smbus_check_adapter()  local
38 list_for_each_entry(smbdev, &psmouse_smbus_list, node) { in psmouse_smbus_check_adapter()
39 if (smbdev->dead) in psmouse_smbus_check_adapter()
42 if (smbdev->client) in psmouse_smbus_check_adapter()
52 psmouse_dbg(smbdev->psmouse, in psmouse_smbus_check_adapter()
54 serio_rescan(smbdev->psmouse->ps2dev.serio); in psmouse_smbus_check_adapter()
62 struct psmouse_smbus_dev *smbdev, *tmp; in psmouse_smbus_detach_i2c_client() local
66 list_for_each_entry_safe(smbdev, tmp, &psmouse_smbus_list, node) { in psmouse_smbus_detach_i2c_client()
67 if (smbdev->client != client) in psmouse_smbus_detach_i2c_client()
73 if (!smbdev->dead) { in psmouse_smbus_detach_i2c_client()
74 psmouse_dbg(smbdev->psmouse, in psmouse_smbus_detach_i2c_client()
76 dev_name(&smbdev->client->dev)); in psmouse_smbus_detach_i2c_client()
77 smbdev->dead = true; in psmouse_smbus_detach_i2c_client()
78 serio_rescan(smbdev->psmouse->ps2dev.serio); in psmouse_smbus_detach_i2c_client()
80 list_del(&smbdev->node); in psmouse_smbus_detach_i2c_client()
81 kfree(smbdev); in psmouse_smbus_detach_i2c_client()
119 struct psmouse_smbus_dev *smbdev = psmouse->private; in psmouse_smbus_reconnect() local
121 if (smbdev->need_deactivate) in psmouse_smbus_reconnect()
168 struct psmouse_smbus_dev *smbdev = psmouse->private; in psmouse_smbus_disconnect() local
172 if (smbdev->dead) { in psmouse_smbus_disconnect()
173 list_del(&smbdev->node); in psmouse_smbus_disconnect()
174 kfree(smbdev); in psmouse_smbus_disconnect()
176 smbdev->dead = true; in psmouse_smbus_disconnect()
177 psmouse_dbg(smbdev->psmouse, in psmouse_smbus_disconnect()
179 dev_name(&smbdev->client->dev)); in psmouse_smbus_disconnect()
180 psmouse_smbus_schedule_remove(smbdev->client); in psmouse_smbus_disconnect()
190 struct psmouse_smbus_dev *smbdev = data; in psmouse_smbus_create_companion() local
191 unsigned short addr_list[] = { smbdev->board.addr, I2C_CLIENT_END }; in psmouse_smbus_create_companion()
202 client = i2c_new_scanned_device(adapter, &smbdev->board, in psmouse_smbus_create_companion()
208 smbdev->client = client; in psmouse_smbus_create_companion()
214 struct psmouse_smbus_dev *smbdev, *tmp; in psmouse_smbus_cleanup() local
218 list_for_each_entry_safe(smbdev, tmp, &psmouse_smbus_list, node) { in psmouse_smbus_cleanup()
219 if (psmouse == smbdev->psmouse) { in psmouse_smbus_cleanup()
220 list_del(&smbdev->node); in psmouse_smbus_cleanup()
221 kfree(smbdev); in psmouse_smbus_cleanup()
234 struct psmouse_smbus_dev *smbdev; in psmouse_smbus_init() local
237 smbdev = kzalloc(sizeof(*smbdev), GFP_KERNEL); in psmouse_smbus_init()
238 if (!smbdev) in psmouse_smbus_init()
241 smbdev->psmouse = psmouse; in psmouse_smbus_init()
242 smbdev->board = *board; in psmouse_smbus_init()
243 smbdev->need_deactivate = need_deactivate; in psmouse_smbus_init()
246 smbdev->board.platform_data = kmemdup(pdata, pdata_size, in psmouse_smbus_init()
248 if (!smbdev->board.platform_data) { in psmouse_smbus_init()
249 kfree(smbdev); in psmouse_smbus_init()
257 psmouse->private = smbdev; in psmouse_smbus_init()
265 list_add_tail(&smbdev->node, &psmouse_smbus_list); in psmouse_smbus_init()
269 error = i2c_for_each_dev(smbdev, psmouse_smbus_create_companion); in psmouse_smbus_init()
271 if (smbdev->client) { in psmouse_smbus_init()
280 kfree(smbdev->board.platform_data); in psmouse_smbus_init()
281 smbdev->board.platform_data = NULL; in psmouse_smbus_init()
285 list_del(&smbdev->node); in psmouse_smbus_init()
288 kfree(smbdev); in psmouse_smbus_init()