drivers/virtio/virtio_rtc_arm.c

Source file repositories/reference/linux-study-clean/drivers/virtio/virtio_rtc_arm.c

File Facts

System
Linux kernel
Corpus path
drivers/virtio/virtio_rtc_arm.c
Extension
.c
Size
518 bytes
Lines
24
Domain
Driver Families
Bucket
drivers/virtio
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-or-later
/*
 * Provides cross-timestamp params for Arm.
 *
 * Copyright (C) 2022-2023 OpenSynergy GmbH
 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/clocksource_ids.h>

#include <uapi/linux/virtio_rtc.h>

#include "virtio_rtc_internal.h"

/* see header for doc */

int viortc_hw_xtstamp_params(u8 *hw_counter, enum clocksource_ids *cs_id)
{
	*hw_counter = VIRTIO_RTC_COUNTER_ARM_VCT;
	*cs_id = CSID_ARM_ARCH_COUNTER;

	return 0;
}

Annotation

Implementation Notes