drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx_private.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx_private.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx_private.h
Extension
.h
Size
9439 bytes
Lines
298
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

#ifndef __CSI_RX_PRIVATE_H_INCLUDED__
#define __CSI_RX_PRIVATE_H_INCLUDED__

#include "rx_csi_defs.h"
#include "mipi_backend_defs.h"
#include "csi_rx.h"

#include "device_access.h"	/* ia_css_device_load_uint32 */

#include "assert_support.h" /* assert */
#include "print_support.h" /* print */

/*****************************************************
 *
 * Device level interface (DLI).
 *
 *****************************************************/
/**
 * @brief Load the register value.
 * Refer to "csi_rx_public.h" for details.
 */
static inline hrt_data csi_rx_fe_ctrl_reg_load(
    const csi_rx_frontend_ID_t ID,
    const hrt_address reg)
{
	assert(ID < N_CSI_RX_FRONTEND_ID);
	assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);
	return ia_css_device_load_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(
					     hrt_data));
}

/**
 * @brief Store a value to the register.
 * Refer to "ibuf_ctrl_public.h" for details.
 */
static inline void csi_rx_fe_ctrl_reg_store(
    const csi_rx_frontend_ID_t ID,
    const hrt_address reg,
    const hrt_data value)
{
	assert(ID < N_CSI_RX_FRONTEND_ID);
	assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);

	ia_css_device_store_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
				   value);
}

/**
 * @brief Load the register value.
 * Refer to "csi_rx_public.h" for details.
 */
static inline hrt_data csi_rx_be_ctrl_reg_load(
    const csi_rx_backend_ID_t ID,
    const hrt_address reg)
{
	assert(ID < N_CSI_RX_BACKEND_ID);
	assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);
	return ia_css_device_load_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(
					     hrt_data));
}

/**
 * @brief Store a value to the register.
 * Refer to "ibuf_ctrl_public.h" for details.
 */
static inline void csi_rx_be_ctrl_reg_store(
    const csi_rx_backend_ID_t ID,
    const hrt_address reg,
    const hrt_data value)
{
	assert(ID < N_CSI_RX_BACKEND_ID);
	assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);

	ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
				   value);
}

/* end of DLI */

/*****************************************************
 *
 * Native command interface (NCI).
 *
 *****************************************************/
/**
 * @brief Get the state of the csi rx fe dlane process.
 * Refer to "csi_rx_public.h" for details.
 */
static inline void csi_rx_fe_ctrl_get_dlane_state(
    const csi_rx_frontend_ID_t ID,

Annotation

Implementation Notes