linux/drivers/powercap/intel_rapl_tpmi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * intel_rapl_tpmi: Intel RAPL driver via TPMI interface
 *
 * Copyright (c) 2023, Intel Corporation.
 * All Rights Reserved.
 *
 */
#define pr_fmt(fmt)

#include <linux/auxiliary_bus.h>
#include <linux/io.h>
#include <linux/intel_tpmi.h>
#include <linux/intel_rapl.h>
#include <linux/module.h>
#include <linux/slab.h>

#define TPMI_RAPL_VERSION

/* 1 header + 10 registers + 5 reserved. 8 bytes for each. */
#define TPMI_RAPL_DOMAIN_SIZE

enum tpmi_rapl_domain_type {};

enum tpmi_rapl_register {};

struct tpmi_rapl_package {};

static LIST_HEAD(tpmi_rapl_packages);
static DEFINE_MUTEX(tpmi_rapl_lock);

static struct powercap_control_type *tpmi_control_type;

static int tpmi_rapl_read_raw(int id, struct reg_action *ra)
{}

static int tpmi_rapl_write_raw(int id, struct reg_action *ra)
{}

static struct tpmi_rapl_package *trp_alloc(int pkg_id)
{}

static void trp_release(struct tpmi_rapl_package *trp)
{}

/*
 * Bit 0 of TPMI_RAPL_REG_DOMAIN_INFO indicates if the current package is a domain
 * root or not. Only domain root packages can enumerate System (Psys) Domain.
 */
#define TPMI_RAPL_DOMAIN_ROOT

static int parse_one_domain(struct tpmi_rapl_package *trp, u32 offset)
{}

static int intel_rapl_tpmi_probe(struct auxiliary_device *auxdev,
				 const struct auxiliary_device_id *id)
{}

static void intel_rapl_tpmi_remove(struct auxiliary_device *auxdev)
{}

static const struct auxiliary_device_id intel_rapl_tpmi_ids[] =;

MODULE_DEVICE_TABLE(auxiliary, intel_rapl_tpmi_ids);

static struct auxiliary_driver intel_rapl_tpmi_driver =;

module_auxiliary_driver()

MODULE_IMPORT_NS();

MODULE_DESCRIPTION();
MODULE_LICENSE();