Lines Matching refs:modem
40 struct nokia_modem_device *modem = (struct nokia_modem_device *)data; in do_nokia_modem_rst_ind_tasklet() local
42 if (!modem) in do_nokia_modem_rst_ind_tasklet()
45 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet()
47 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet()
48 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet()
53 struct nokia_modem_device *modem = (struct nokia_modem_device *)data; in nokia_modem_rst_ind_isr() local
55 tasklet_schedule(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_rst_ind_isr()
62 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_unexport() local
65 for (i = 0; i < modem->gpio_amount; i++) { in nokia_modem_gpio_unexport()
66 sysfs_remove_link(&dev->kobj, modem->gpios[i].name); in nokia_modem_gpio_unexport()
67 gpiod_unexport(modem->gpios[i].gpio); in nokia_modem_gpio_unexport()
74 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_probe() local
90 modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios), in nokia_modem_gpio_probe()
92 if (!modem->gpios) in nokia_modem_gpio_probe()
95 modem->gpio_amount = gpio_count; in nokia_modem_gpio_probe()
98 modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i, in nokia_modem_gpio_probe()
100 if (IS_ERR(modem->gpios[i].gpio)) { in nokia_modem_gpio_probe()
102 return PTR_ERR(modem->gpios[i].gpio); in nokia_modem_gpio_probe()
106 &(modem->gpios[i].name)); in nokia_modem_gpio_probe()
112 err = gpiod_export(modem->gpios[i].gpio, 0); in nokia_modem_gpio_probe()
116 err = gpiod_export_link(dev, modem->gpios[i].name, in nokia_modem_gpio_probe()
117 modem->gpios[i].gpio); in nokia_modem_gpio_probe()
128 struct nokia_modem_device *modem; in nokia_modem_probe() local
141 modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); in nokia_modem_probe()
142 if (!modem) in nokia_modem_probe()
145 dev_set_drvdata(dev, modem); in nokia_modem_probe()
146 modem->device = dev; in nokia_modem_probe()
153 modem->nokia_modem_rst_ind_irq = irq; in nokia_modem_probe()
156 tasklet_init(&modem->nokia_modem_rst_ind_tasklet, in nokia_modem_probe()
157 do_nokia_modem_rst_ind_tasklet, (unsigned long)modem); in nokia_modem_probe()
159 pflags, "modem_rst_ind", modem); in nokia_modem_probe()
181 modem->ssi_protocol = hsi_new_client(port, &ssip); in nokia_modem_probe()
182 if (!modem->ssi_protocol) { in nokia_modem_probe()
188 err = device_attach(&modem->ssi_protocol->device); in nokia_modem_probe()
204 modem->cmt_speech = hsi_new_client(port, &cmtspeech); in nokia_modem_probe()
205 if (!modem->cmt_speech) { in nokia_modem_probe()
211 err = device_attach(&modem->cmt_speech->device); in nokia_modem_probe()
226 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_probe()
228 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_probe()
232 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_probe()
233 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_probe()
240 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_remove() local
242 if (!modem) in nokia_modem_remove()
245 if (modem->cmt_speech) { in nokia_modem_remove()
246 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_remove()
247 modem->cmt_speech = NULL; in nokia_modem_remove()
250 if (modem->ssi_protocol) { in nokia_modem_remove()
251 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_remove()
252 modem->ssi_protocol = NULL; in nokia_modem_remove()
257 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_remove()
258 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_remove()