#include <linux/hwmon.h>
#include <linux/units.h>
#include <asm/unaligned.h>
#include "nvme.h"
struct nvme_hwmon_data { … };
static int nvme_get_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under,
long *temp)
{ … }
static int nvme_set_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under,
long temp)
{ … }
static int nvme_hwmon_get_smart_log(struct nvme_hwmon_data *data)
{ … }
static int nvme_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int nvme_hwmon_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static const char * const nvme_hwmon_sensor_names[] = …;
static int nvme_hwmon_read_string(struct device *dev,
enum hwmon_sensor_types type, u32 attr,
int channel, const char **str)
{ … }
static umode_t nvme_hwmon_is_visible(const void *_data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info *const nvme_hwmon_info[] = …;
static const struct hwmon_ops nvme_hwmon_ops = …;
static const struct hwmon_chip_info nvme_hwmon_chip_info = …;
int nvme_hwmon_init(struct nvme_ctrl *ctrl)
{ … }
void nvme_hwmon_exit(struct nvme_ctrl *ctrl)
{ … }