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()
117 if (IS_ERR(modem->gpios[i].gpio)) { in nokia_modem_gpio_probe()
119 return PTR_ERR(modem->gpios[i].gpio); in nokia_modem_gpio_probe()
123 &(modem->gpios[i].name)); in nokia_modem_gpio_probe()
129 err = gpiod_export(modem->gpios[i].gpio, 0); in nokia_modem_gpio_probe()
133 err = gpiod_export_link(dev, modem->gpios[i].name, in nokia_modem_gpio_probe()
134 modem->gpios[i].gpio); in nokia_modem_gpio_probe()
145 struct nokia_modem_device *modem; in nokia_modem_probe() local
158 modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); in nokia_modem_probe()
159 if (!modem) { in nokia_modem_probe()
163 dev_set_drvdata(dev, modem); in nokia_modem_probe()
164 modem->device = dev; in nokia_modem_probe()
171 modem->nokia_modem_rst_ind_irq = irq; in nokia_modem_probe()
174 tasklet_init(&modem->nokia_modem_rst_ind_tasklet, in nokia_modem_probe()
175 do_nokia_modem_rst_ind_tasklet, (unsigned long)modem); in nokia_modem_probe()
177 pflags, "modem_rst_ind", modem); in nokia_modem_probe()
199 modem->ssi_protocol = hsi_new_client(port, &ssip); in nokia_modem_probe()
200 if (!modem->ssi_protocol) { in nokia_modem_probe()
206 err = device_attach(&modem->ssi_protocol->device); in nokia_modem_probe()
222 modem->cmt_speech = hsi_new_client(port, &cmtspeech); in nokia_modem_probe()
223 if (!modem->cmt_speech) { in nokia_modem_probe()
229 err = device_attach(&modem->cmt_speech->device); in nokia_modem_probe()
244 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_probe()
246 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_probe()
250 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_probe()
251 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_probe()
258 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_remove() local
260 if (!modem) in nokia_modem_remove()
263 if (modem->cmt_speech) { in nokia_modem_remove()
264 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_remove()
265 modem->cmt_speech = NULL; in nokia_modem_remove()
268 if (modem->ssi_protocol) { in nokia_modem_remove()
269 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_remove()
270 modem->ssi_protocol = NULL; in nokia_modem_remove()
275 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_remove()
276 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_remove()