drivers/platform/x86/amd/amd_isp4.c

Source file repositories/reference/linux-study-clean/drivers/platform/x86/amd/amd_isp4.c

File Facts

System
Linux kernel
Corpus path
drivers/platform/x86/amd/amd_isp4.c
Extension
.c
Size
10654 bytes
Lines
420
Domain
Driver Families
Bucket
drivers/platform
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

struct amdisp_platform_info {
	struct i2c_board_info board_info;
	const struct software_node **swnodes;
};

/*
 * AMD ISP platform definition to configure the device properties
 * missing in the ACPI table.
 */
struct amdisp_platform {
	const struct amdisp_platform_info *pinfo;
	struct i2c_board_info board_info;
	struct notifier_block i2c_nb;
	struct i2c_client *i2c_dev;
	struct mutex lock;	/* protects i2c client creation */
};

/* Root AMD CAMERA SWNODE */

/* Root amd camera node definition */
static const struct software_node amd_camera_node = {
	.name = "amd_camera",
};

/* ISP4 SWNODE */

/* ISP4 OV05C10 camera node definition */
static const struct software_node isp4_node = {
	.name = "isp4",
	.parent = &amd_camera_node,
};

/*
 * ISP4 Ports node definition. No properties defined for
 * ports node.
 */
static const struct software_node isp4_ports = {
	.name = "ports",
	.parent = &isp4_node,
};

/*
 * ISP4 Port node definition. No properties defined for
 * port node.
 */
static const struct software_node isp4_port_node = {
	.name = "port@0",
	.parent = &isp4_ports,
};

/*
 * ISP4 MIPI1 remote endpoint points to OV05C10 endpoint
 * node.
 */
static const struct software_node_ref_args isp4_refs[] = {
	SOFTWARE_NODE_REFERENCE(&ov05c10_endpoint_node),
};

/* ISP4 MIPI1 endpoint node properties table */
static const struct property_entry isp4_mipi1_endpoint_props[] = {
	PROPERTY_ENTRY_REF_ARRAY("remote-endpoint", isp4_refs),
	{ }
};

/* ISP4 MIPI1 endpoint node definition */
static const struct software_node isp4_mipi1_endpoint_node = {
	.name = "endpoint",
	.parent = &isp4_port_node,
	.properties = isp4_mipi1_endpoint_props,
};

/* I2C1 SWNODE */

/* I2C1 camera node property table */
static const struct property_entry i2c1_camera_props[] = {
	PROPERTY_ENTRY_U32("clock-frequency", 1 * HZ_PER_MHZ),
	{ }
};

/* I2C1 camera node definition */
static const struct software_node i2c1_node = {
	.name = "i2c1",
	.parent = &amd_camera_node,
	.properties = i2c1_camera_props,
};

/* I2C1 camera node property table */
static const struct property_entry ov05c10_camera_props[] = {
	PROPERTY_ENTRY_U32("clock-frequency", 24 * HZ_PER_MHZ),
	{ }

Annotation

Implementation Notes