linux/drivers/hwmon/peci/dimmtemp.c

// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) 2018-2021 Intel Corporation

#include <linux/auxiliary_bus.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/devm-helpers.h>
#include <linux/hwmon.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/peci.h>
#include <linux/peci-cpu.h>
#include <linux/units.h>
#include <linux/workqueue.h>

#include "common.h"

#define DIMM_MASK_CHECK_DELAY_JIFFIES

/* Max number of channel ranks and DIMM index per channel */
#define CHAN_RANK_MAX_ON_HSX
#define DIMM_IDX_MAX_ON_HSX
#define CHAN_RANK_MAX_ON_BDX
#define DIMM_IDX_MAX_ON_BDX
#define CHAN_RANK_MAX_ON_BDXD
#define DIMM_IDX_MAX_ON_BDXD
#define CHAN_RANK_MAX_ON_SKX
#define DIMM_IDX_MAX_ON_SKX
#define CHAN_RANK_MAX_ON_ICX
#define DIMM_IDX_MAX_ON_ICX
#define CHAN_RANK_MAX_ON_ICXD
#define DIMM_IDX_MAX_ON_ICXD
#define CHAN_RANK_MAX_ON_SPR
#define DIMM_IDX_MAX_ON_SPR

#define CHAN_RANK_MAX
#define DIMM_IDX_MAX
#define DIMM_NUMS_MAX

#define CPU_SEG_MASK
#define GET_CPU_SEG(x)
#define CPU_BUS_MASK
#define GET_CPU_BUS(x)

#define DIMM_TEMP_MAX
#define DIMM_TEMP_CRIT
#define GET_TEMP_MAX(x)
#define GET_TEMP_CRIT(x)

#define NO_DIMM_RETRY_COUNT_MAX

struct peci_dimmtemp;

struct dimm_info {};

struct peci_dimm_thresholds {};

enum peci_dimm_threshold_type {};

struct peci_dimmtemp {};

static u8 __dimm_temp(u32 reg, int dimm_order)
{}

static int get_dimm_temp(struct peci_dimmtemp *priv, int dimm_no, long *val)
{}

static int update_thresholds(struct peci_dimmtemp *priv, int dimm_no)
{}

static int get_dimm_thresholds(struct peci_dimmtemp *priv, enum peci_dimm_threshold_type type,
			       int dimm_no, long *val)
{}

static int dimmtemp_read_string(struct device *dev,
				enum hwmon_sensor_types type,
				u32 attr, int channel, const char **str)
{}

static int dimmtemp_read(struct device *dev, enum hwmon_sensor_types type,
			 u32 attr, int channel, long *val)
{}

static umode_t dimmtemp_is_visible(const void *data, enum hwmon_sensor_types type,
				   u32 attr, int channel)
{}

static const struct hwmon_ops peci_dimmtemp_ops =;

static int check_populated_dimms(struct peci_dimmtemp *priv)
{}

static int create_dimm_temp_label(struct peci_dimmtemp *priv, int chan)
{}

static const struct hwmon_channel_info * const peci_dimmtemp_temp_info[] =;

static const struct hwmon_chip_info peci_dimmtemp_chip_info =;

static int create_dimm_temp_info(struct peci_dimmtemp *priv)
{}

static void create_dimm_temp_info_delayed(struct work_struct *work)
{}

static int peci_dimmtemp_probe(struct auxiliary_device *adev, const struct auxiliary_device_id *id)
{}

static int
read_thresholds_hsx(struct peci_dimmtemp *priv, int dimm_order, int chan_rank, u32 *data)
{}

static int
read_thresholds_bdxd(struct peci_dimmtemp *priv, int dimm_order, int chan_rank, u32 *data)
{}

static int
read_thresholds_skx(struct peci_dimmtemp *priv, int dimm_order, int chan_rank, u32 *data)
{}

static int
read_thresholds_icx(struct peci_dimmtemp *priv, int dimm_order, int chan_rank, u32 *data)
{}

static int
read_thresholds_spr(struct peci_dimmtemp *priv, int dimm_order, int chan_rank, u32 *data)
{}

static const struct dimm_info dimm_hsx =;

static const struct dimm_info dimm_bdx =;

static const struct dimm_info dimm_bdxd =;

static const struct dimm_info dimm_skx =;

static const struct dimm_info dimm_icx =;

static const struct dimm_info dimm_icxd =;

static const struct dimm_info dimm_spr =;

static const struct auxiliary_device_id peci_dimmtemp_ids[] =;
MODULE_DEVICE_TABLE(auxiliary, peci_dimmtemp_ids);

static struct auxiliary_driver peci_dimmtemp_driver =;

module_auxiliary_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_IMPORT_NS();