sound/soc/fsl/fsl_ssi_dbg.c

Source file repositories/reference/linux-study-clean/sound/soc/fsl/fsl_ssi_dbg.c

File Facts

System
Linux kernel
Corpus path
sound/soc/fsl/fsl_ssi_dbg.c
Extension
.c
Size
2874 bytes
Lines
141
Domain
Driver Families
Bucket
sound/soc
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

// SPDX-License-Identifier: GPL-2.0
//
// Freescale SSI ALSA SoC Digital Audio Interface (DAI) debugging functions
//
// Copyright 2014 Markus Pargmann <mpa@pengutronix.de>, Pengutronix
//
// Split from fsl_ssi.c

#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/kernel.h>

#include "fsl_ssi.h"

void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *dbg, u32 sisr)
{
	if (sisr & SSI_SISR_RFRC)
		dbg->stats.rfrc++;

	if (sisr & SSI_SISR_TFRC)
		dbg->stats.tfrc++;

	if (sisr & SSI_SISR_CMDAU)
		dbg->stats.cmdau++;

	if (sisr & SSI_SISR_CMDDU)
		dbg->stats.cmddu++;

	if (sisr & SSI_SISR_RXT)
		dbg->stats.rxt++;

	if (sisr & SSI_SISR_RDR1)
		dbg->stats.rdr1++;

	if (sisr & SSI_SISR_RDR0)
		dbg->stats.rdr0++;

	if (sisr & SSI_SISR_TDE1)
		dbg->stats.tde1++;

	if (sisr & SSI_SISR_TDE0)
		dbg->stats.tde0++;

	if (sisr & SSI_SISR_ROE1)
		dbg->stats.roe1++;

	if (sisr & SSI_SISR_ROE0)
		dbg->stats.roe0++;

	if (sisr & SSI_SISR_TUE1)
		dbg->stats.tue1++;

	if (sisr & SSI_SISR_TUE0)
		dbg->stats.tue0++;

	if (sisr & SSI_SISR_TFS)
		dbg->stats.tfs++;

	if (sisr & SSI_SISR_RFS)
		dbg->stats.rfs++;

	if (sisr & SSI_SISR_TLS)
		dbg->stats.tls++;

	if (sisr & SSI_SISR_RLS)
		dbg->stats.rls++;

	if (sisr & SSI_SISR_RFF1)
		dbg->stats.rff1++;

	if (sisr & SSI_SISR_RFF0)
		dbg->stats.rff0++;

	if (sisr & SSI_SISR_TFE1)
		dbg->stats.tfe1++;

	if (sisr & SSI_SISR_TFE0)
		dbg->stats.tfe0++;
}

/*
 * Show the statistics of a flag only if its interrupt is enabled
 *
 * Compilers will optimize it to a no-op if the interrupt is disabled
 */
#define SIER_SHOW(flag, name) \
	do { \
		if (SSI_SIER_##flag) \
			seq_printf(s, #name "=%u\n", ssi_dbg->stats.name); \
	} while (0)

Annotation

Implementation Notes