Lines Matching refs:bcmsdh_osinfo
151 bcmsdh_os_info_t *bcmsdh_osinfo = NULL; in bcmsdh_probe() local
158 bcmsdh_osinfo = MALLOC(osh, sizeof(bcmsdh_os_info_t)); in bcmsdh_probe()
159 if (bcmsdh_osinfo == NULL) { in bcmsdh_probe()
163 bzero((char *)bcmsdh_osinfo, sizeof(bcmsdh_os_info_t)); in bcmsdh_probe()
164 bcmsdh->os_cxt = bcmsdh_osinfo; in bcmsdh_probe()
165 bcmsdh_osinfo->sdioh = sdioh; in bcmsdh_probe()
166 bcmsdh_osinfo->dev = dev; in bcmsdh_probe()
172 bcmsdh_osinfo->dev_wake_enabled = TRUE; in bcmsdh_probe()
178 spin_lock_init(&bcmsdh_osinfo->oob_irq_spinlock); in bcmsdh_probe()
180 bcmsdh_osinfo->oob_irq_num = wifi_platform_get_irq_number(adapter_info, in bcmsdh_probe()
181 &bcmsdh_osinfo->oob_irq_flags); in bcmsdh_probe()
182 if (bcmsdh_osinfo->oob_irq_num < 0) { in bcmsdh_probe()
193 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num, in bcmsdh_probe()
196 bcmsdh_osinfo->context = drvinfo.probe((vendevid >> 16), (vendevid & 0xFFFF), bus_num, in bcmsdh_probe()
199 if (bcmsdh_osinfo->context == NULL) { in bcmsdh_probe()
210 if (bcmsdh_osinfo != NULL) in bcmsdh_probe()
211 MFREE(osh, bcmsdh_osinfo, sizeof(bcmsdh_os_info_t)); in bcmsdh_probe()
217 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_remove() local
221 if (bcmsdh_osinfo->dev) in bcmsdh_remove()
222 device_init_wakeup(bcmsdh_osinfo->dev, false); in bcmsdh_remove()
223 bcmsdh_osinfo->dev_wake_enabled = FALSE; in bcmsdh_remove()
228 drvinfo.remove(bcmsdh_osinfo->context); in bcmsdh_remove()
243 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_set_get_wake() local
247 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_set_get_wake()
253 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_set_get_wake()
260 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_suspend() local
262 if (drvinfo.suspend && drvinfo.suspend(bcmsdh_osinfo->context)) in bcmsdh_suspend()
269 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_resume() local
272 return drvinfo.resume(bcmsdh_osinfo->context); in bcmsdh_resume()
322 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_pm_stay_awake() local
323 pm_stay_awake(bcmsdh_osinfo->dev); in bcmsdh_dev_pm_stay_awake()
333 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_relax() local
334 pm_relax(bcmsdh_osinfo->dev); in bcmsdh_dev_relax()
342 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_dev_pm_enabled() local
344 return bcmsdh_osinfo->dev_wake_enabled; in bcmsdh_dev_pm_enabled()
351 bcmsdh_os_info_t *bcmsdh_osinfo; in bcmsdh_oob_intr_set() local
356 bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_set()
357 spin_lock_irqsave(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_oob_intr_set()
358 if (bcmsdh_osinfo->oob_irq_enabled != enable) { in bcmsdh_oob_intr_set()
360 enable_irq(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_set()
362 disable_irq_nosync(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_set()
363 bcmsdh_osinfo->oob_irq_enabled = enable; in bcmsdh_oob_intr_set()
365 spin_unlock_irqrestore(&bcmsdh_osinfo->oob_irq_spinlock, flags); in bcmsdh_oob_intr_set()
371 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in wlan_oob_irq() local
376 bcmsdh_osinfo->oob_irq_handler(bcmsdh_osinfo->oob_irq_handler_context); in wlan_oob_irq()
385 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_register() local
388 if (bcmsdh_osinfo->oob_irq_registered) { in bcmsdh_oob_intr_register()
393 (int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags)); in bcmsdh_oob_intr_register()
394 bcmsdh_osinfo->oob_irq_handler = oob_irq_handler; in bcmsdh_oob_intr_register()
395 bcmsdh_osinfo->oob_irq_handler_context = oob_irq_handler_context; in bcmsdh_oob_intr_register()
396 bcmsdh_osinfo->oob_irq_enabled = TRUE; in bcmsdh_oob_intr_register()
397 bcmsdh_osinfo->oob_irq_registered = TRUE; in bcmsdh_oob_intr_register()
398 err = request_irq(bcmsdh_osinfo->oob_irq_num, wlan_oob_irq, in bcmsdh_oob_intr_register()
399 bcmsdh_osinfo->oob_irq_flags, "bcmsdh_sdmmc", bcmsdh); in bcmsdh_oob_intr_register()
402 bcmsdh_osinfo->oob_irq_enabled = FALSE; in bcmsdh_oob_intr_register()
403 bcmsdh_osinfo->oob_irq_registered = FALSE; in bcmsdh_oob_intr_register()
408 if (device_may_wakeup(bcmsdh_osinfo->dev)) { in bcmsdh_oob_intr_register()
410 err = enable_irq_wake(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_register()
412 bcmsdh_osinfo->oob_irq_wake_enabled = TRUE; in bcmsdh_oob_intr_register()
422 bcmsdh_os_info_t *bcmsdh_osinfo = bcmsdh->os_cxt; in bcmsdh_oob_intr_unregister() local
425 if (!bcmsdh_osinfo->oob_irq_registered) { in bcmsdh_oob_intr_unregister()
429 if (bcmsdh_osinfo->oob_irq_wake_enabled) { in bcmsdh_oob_intr_unregister()
431 if (device_may_wakeup(bcmsdh_osinfo->dev)) { in bcmsdh_oob_intr_unregister()
433 err = disable_irq_wake(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_unregister()
435 bcmsdh_osinfo->oob_irq_wake_enabled = FALSE; in bcmsdh_oob_intr_unregister()
440 if (bcmsdh_osinfo->oob_irq_enabled) { in bcmsdh_oob_intr_unregister()
441 disable_irq(bcmsdh_osinfo->oob_irq_num); in bcmsdh_oob_intr_unregister()
442 bcmsdh_osinfo->oob_irq_enabled = FALSE; in bcmsdh_oob_intr_unregister()
444 free_irq(bcmsdh_osinfo->oob_irq_num, bcmsdh); in bcmsdh_oob_intr_unregister()
445 bcmsdh_osinfo->oob_irq_registered = FALSE; in bcmsdh_oob_intr_unregister()