Lines Matching refs:hmux

267 	struct omap_hwmod_mux_info *hmux;  in omap_hwmod_mux_init()  local
273 hmux = kzalloc(sizeof(struct omap_hwmod_mux_info), GFP_KERNEL); in omap_hwmod_mux_init()
274 if (!hmux) in omap_hwmod_mux_init()
277 hmux->nr_pads = nr_pads; in omap_hwmod_mux_init()
279 hmux->pads = kzalloc(sizeof(struct omap_device_pad) * in omap_hwmod_mux_init()
281 if (!hmux->pads) in omap_hwmod_mux_init()
284 for (i = 0; i < hmux->nr_pads; i++) { in omap_hwmod_mux_init()
286 struct omap_device_pad *bpad = &bpads[i], *pad = &hmux->pads[i]; in omap_hwmod_mux_init()
303 kfree(hmux->pads[j].name); in omap_hwmod_mux_init()
321 return hmux; in omap_hwmod_mux_init()
327 hmux->nr_pads_dynamic = nr_pads_dynamic; in omap_hwmod_mux_init()
328 hmux->pads_dynamic = kzalloc(sizeof(struct omap_device_pad *) * in omap_hwmod_mux_init()
330 if (!hmux->pads_dynamic) { in omap_hwmod_mux_init()
332 return hmux; in omap_hwmod_mux_init()
336 for (i = 0; i < hmux->nr_pads; i++) { in omap_hwmod_mux_init()
337 struct omap_device_pad *pad = &hmux->pads[i]; in omap_hwmod_mux_init()
343 hmux->pads_dynamic[nr_pads_dynamic] = pad; in omap_hwmod_mux_init()
348 return hmux; in omap_hwmod_mux_init()
351 kfree(hmux->pads); in omap_hwmod_mux_init()
353 kfree(hmux); in omap_hwmod_mux_init()
371 static bool omap_hwmod_mux_scan_wakeups(struct omap_hwmod_mux_info *hmux, in omap_hwmod_mux_scan_wakeups() argument
378 for (i = 0; i < hmux->nr_pads_dynamic; i++) { in omap_hwmod_mux_scan_wakeups()
379 struct omap_device_pad *pad = hmux->pads_dynamic[i]; in omap_hwmod_mux_scan_wakeups()
389 if (!hmux->irqs) in omap_hwmod_mux_scan_wakeups()
392 irq = hmux->irqs[i]; in omap_hwmod_mux_scan_wakeups()
433 void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) in omap_hwmod_mux() argument
438 if (state == _HWMOD_STATE_IDLE && hmux->enabled) { in omap_hwmod_mux()
439 for (i = 0; i < hmux->nr_pads_dynamic; i++) { in omap_hwmod_mux()
440 struct omap_device_pad *pad = hmux->pads_dynamic[i]; in omap_hwmod_mux()
452 if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic in omap_hwmod_mux()
453 && hmux->enabled) { in omap_hwmod_mux()
454 for (i = 0; i < hmux->nr_pads_dynamic; i++) { in omap_hwmod_mux()
455 struct omap_device_pad *pad = hmux->pads_dynamic[i]; in omap_hwmod_mux()
467 for (i = 0; i < hmux->nr_pads; i++) { in omap_hwmod_mux()
468 struct omap_device_pad *pad = &hmux->pads[i]; in omap_hwmod_mux()
501 hmux->enabled = true; in omap_hwmod_mux()
503 hmux->enabled = false; in omap_hwmod_mux()