Lines Matching refs:modem

54 	struct nokia_modem_device *modem = (struct nokia_modem_device *)data;  in do_nokia_modem_rst_ind_tasklet()  local
56 if (!modem) in do_nokia_modem_rst_ind_tasklet()
59 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet()
61 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet()
62 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet()
67 struct nokia_modem_device *modem = (struct nokia_modem_device *)data; in nokia_modem_rst_ind_isr() local
69 tasklet_schedule(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_rst_ind_isr()
76 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_unexport() local
79 for (i = 0; i < modem->gpio_amount; i++) { in nokia_modem_gpio_unexport()
80 sysfs_remove_link(&dev->kobj, modem->gpios[i].name); in nokia_modem_gpio_unexport()
81 gpiod_unexport(modem->gpios[i].gpio); in nokia_modem_gpio_unexport()
88 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_probe() local
105 modem->gpios = devm_kzalloc(dev, gpio_count * in nokia_modem_gpio_probe()
107 if (!modem->gpios) { in nokia_modem_gpio_probe()
112 modem->gpio_amount = gpio_count; in nokia_modem_gpio_probe()
115 modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i); in nokia_modem_gpio_probe()
116 if (IS_ERR(modem->gpios[i].gpio)) { in nokia_modem_gpio_probe()
118 return PTR_ERR(modem->gpios[i].gpio); in nokia_modem_gpio_probe()
122 &(modem->gpios[i].name)); in nokia_modem_gpio_probe()
128 err = gpiod_direction_output(modem->gpios[i].gpio, 0); in nokia_modem_gpio_probe()
132 err = gpiod_export(modem->gpios[i].gpio, 0); in nokia_modem_gpio_probe()
136 err = gpiod_export_link(dev, modem->gpios[i].name, in nokia_modem_gpio_probe()
137 modem->gpios[i].gpio); in nokia_modem_gpio_probe()
148 struct nokia_modem_device *modem; in nokia_modem_probe() local
161 modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); in nokia_modem_probe()
162 if (!modem) { in nokia_modem_probe()
166 dev_set_drvdata(dev, modem); in nokia_modem_probe()
167 modem->device = dev; in nokia_modem_probe()
174 modem->nokia_modem_rst_ind_irq = irq; in nokia_modem_probe()
177 tasklet_init(&modem->nokia_modem_rst_ind_tasklet, in nokia_modem_probe()
178 do_nokia_modem_rst_ind_tasklet, (unsigned long)modem); in nokia_modem_probe()
180 pflags, "modem_rst_ind", modem); in nokia_modem_probe()
202 modem->ssi_protocol = hsi_new_client(port, &ssip); in nokia_modem_probe()
203 if (!modem->ssi_protocol) { in nokia_modem_probe()
209 err = device_attach(&modem->ssi_protocol->device); in nokia_modem_probe()
225 modem->cmt_speech = hsi_new_client(port, &cmtspeech); in nokia_modem_probe()
226 if (!modem->cmt_speech) { in nokia_modem_probe()
232 err = device_attach(&modem->cmt_speech->device); in nokia_modem_probe()
247 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_probe()
249 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_probe()
253 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_probe()
254 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_probe()
261 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_remove() local
263 if (!modem) in nokia_modem_remove()
266 if (modem->cmt_speech) { in nokia_modem_remove()
267 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_remove()
268 modem->cmt_speech = NULL; in nokia_modem_remove()
271 if (modem->ssi_protocol) { in nokia_modem_remove()
272 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_remove()
273 modem->ssi_protocol = NULL; in nokia_modem_remove()
278 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_remove()
279 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_remove()