Lines Matching refs:ctrl

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