Lines Matching refs:ctrl
14 struct nvme_ctrl *ctrl;
19 static int nvme_get_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under,
29 ret = nvme_get_features(ctrl, NVME_FEAT_TEMP_THRESH, threshold, NULL, 0,
40 static int nvme_set_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under,
52 ret = nvme_set_features(ctrl, NVME_FEAT_TEMP_THRESH, threshold, NULL, 0,
62 return nvme_get_log(data->ctrl, NVME_NSID_ALL, NVME_LOG_SMART, 0,
80 return nvme_get_temp_thresh(data->ctrl, channel, false, val);
82 return nvme_get_temp_thresh(data->ctrl, channel, true, val);
84 *val = kelvin_to_millicelsius(data->ctrl->cctemp);
122 return nvme_set_temp_thresh(data->ctrl, channel, false, val);
124 return nvme_set_temp_thresh(data->ctrl, channel, true, val);
160 if (!channel && data->ctrl->cctemp)
165 if ((!channel && data->ctrl->wctemp) ||
167 !(data->ctrl->quirks &
169 if (data->ctrl->quirks &
226 int nvme_hwmon_init(struct nvme_ctrl *ctrl)
228 struct device *dev = ctrl->device;
243 data->ctrl = ctrl;
260 ctrl->hwmon_device = hwmon;
270 void nvme_hwmon_exit(struct nvme_ctrl *ctrl)
272 if (ctrl->hwmon_device) {
274 dev_get_drvdata(ctrl->hwmon_device);
276 hwmon_device_unregister(ctrl->hwmon_device);
277 ctrl->hwmon_device = NULL;