Lines Matching refs:modem

41 	struct nokia_modem_device *modem = (struct nokia_modem_device *)data;  in do_nokia_modem_rst_ind_tasklet()  local
43 if (!modem) in do_nokia_modem_rst_ind_tasklet()
46 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet()
48 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet()
49 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet()
54 struct nokia_modem_device *modem = (struct nokia_modem_device *)data; in nokia_modem_rst_ind_isr() local
56 tasklet_schedule(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_rst_ind_isr()
63 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_unexport() local
66 for (i = 0; i < modem->gpio_amount; i++) { in nokia_modem_gpio_unexport()
67 sysfs_remove_link(&dev->kobj, modem->gpios[i].name); in nokia_modem_gpio_unexport()
68 gpiod_unexport(modem->gpios[i].gpio); in nokia_modem_gpio_unexport()
75 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_gpio_probe() local
92 modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios), in nokia_modem_gpio_probe()
94 if (!modem->gpios) in nokia_modem_gpio_probe()
97 modem->gpio_amount = gpio_count; in nokia_modem_gpio_probe()
100 modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i, in nokia_modem_gpio_probe()
102 if (IS_ERR(modem->gpios[i].gpio)) { in nokia_modem_gpio_probe()
104 return PTR_ERR(modem->gpios[i].gpio); in nokia_modem_gpio_probe()
108 &(modem->gpios[i].name)); in nokia_modem_gpio_probe()
114 err = gpiod_export(modem->gpios[i].gpio, 0); in nokia_modem_gpio_probe()
118 err = gpiod_export_link(dev, modem->gpios[i].name, in nokia_modem_gpio_probe()
119 modem->gpios[i].gpio); in nokia_modem_gpio_probe()
130 struct nokia_modem_device *modem; in nokia_modem_probe() local
143 modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); in nokia_modem_probe()
144 if (!modem) in nokia_modem_probe()
147 dev_set_drvdata(dev, modem); in nokia_modem_probe()
148 modem->device = dev; in nokia_modem_probe()
155 modem->nokia_modem_rst_ind_irq = irq; in nokia_modem_probe()
158 tasklet_init(&modem->nokia_modem_rst_ind_tasklet, in nokia_modem_probe()
159 do_nokia_modem_rst_ind_tasklet, (unsigned long)modem); in nokia_modem_probe()
161 pflags, "modem_rst_ind", modem); in nokia_modem_probe()
183 modem->ssi_protocol = hsi_new_client(port, &ssip); in nokia_modem_probe()
184 if (!modem->ssi_protocol) { in nokia_modem_probe()
190 err = device_attach(&modem->ssi_protocol->device); in nokia_modem_probe()
206 modem->cmt_speech = hsi_new_client(port, &cmtspeech); in nokia_modem_probe()
207 if (!modem->cmt_speech) { in nokia_modem_probe()
213 err = device_attach(&modem->cmt_speech->device); in nokia_modem_probe()
228 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_probe()
230 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_probe()
234 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_probe()
235 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_probe()
242 struct nokia_modem_device *modem = dev_get_drvdata(dev); in nokia_modem_remove() local
244 if (!modem) in nokia_modem_remove()
247 if (modem->cmt_speech) { in nokia_modem_remove()
248 hsi_remove_client(&modem->cmt_speech->device, NULL); in nokia_modem_remove()
249 modem->cmt_speech = NULL; in nokia_modem_remove()
252 if (modem->ssi_protocol) { in nokia_modem_remove()
253 hsi_remove_client(&modem->ssi_protocol->device, NULL); in nokia_modem_remove()
254 modem->ssi_protocol = NULL; in nokia_modem_remove()
259 disable_irq_wake(modem->nokia_modem_rst_ind_irq); in nokia_modem_remove()
260 tasklet_kill(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_remove()