#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 …
#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)
{ … }
#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(…) …;