drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
Extension
.c
Size
1838 bytes
Lines
78
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (bitop_getbit(cur_rsrc->active_table, i) == 0) {
				bitop_setbit(cur_rsrc->active_table, i);
				*channel = i;
				cur_rsrc->num_active++;
				retval = true;
				break;
			}
		}
	}

	return retval;
}

void ia_css_isys_dma_channel_rmgr_release(
    isys2401_dma_ID_t	dma_id,
    isys2401_dma_channel	*channel)
{
	isys2401_dma_channel	max_dma_channel;
	isys_dma_rsrc_t		*cur_rsrc = NULL;

	assert(dma_id < N_ISYS2401_DMA_ID);
	assert(channel);

	max_dma_channel = N_ISYS2401_DMA_CHANNEL_PROCS[dma_id];
	cur_rsrc = &isys_dma_rsrc[dma_id];

	if ((*channel < max_dma_channel) && (cur_rsrc->num_active > 0)) {
		if (bitop_getbit(cur_rsrc->active_table, *channel) == 1) {
			bitop_clearbit(cur_rsrc->active_table, *channel);
			cur_rsrc->num_active--;
		}
	}
}

Annotation

Implementation Notes