Lines Matching +full:sr +full:- +full:thermal
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Windfarm PowerMac thermal control. MAX6690 sensor.
34 static int wf_max6690_get(struct wf_sensor *sr, s32 *value) in wf_max6690_get() argument
36 struct wf_6690_sensor *max = wf_to_6690(sr); in wf_max6690_get()
39 if (max->i2c == NULL) in wf_max6690_get()
40 return -ENODEV; in wf_max6690_get()
43 data = i2c_smbus_read_byte_data(max->i2c, MAX6690_EXTERNAL_TEMP); in wf_max6690_get()
50 static void wf_max6690_release(struct wf_sensor *sr) in wf_max6690_release() argument
52 struct wf_6690_sensor *max = wf_to_6690(sr); in wf_max6690_release()
69 loc = of_get_property(client->dev.of_node, "hwsensor-location", NULL); in wf_max6690_probe()
71 dev_warn(&client->dev, "Missing hwsensor-location property!\n"); in wf_max6690_probe()
72 return -ENXIO; in wf_max6690_probe()
80 name = "backside-temp"; in wf_max6690_probe()
82 name = "north-bridge-temp"; in wf_max6690_probe()
84 name = "gpu-temp"; in wf_max6690_probe()
86 return -ENXIO; in wf_max6690_probe()
92 return -ENOMEM; in wf_max6690_probe()
95 max->i2c = client; in wf_max6690_probe()
96 max->sens.name = name; in wf_max6690_probe()
97 max->sens.ops = &wf_max6690_ops; in wf_max6690_probe()
100 rc = wf_register_sensor(&max->sens); in wf_max6690_probe()
110 max->i2c = NULL; in wf_max6690_remove()
111 wf_unregister_sensor(&max->sens); in wf_max6690_remove()
139 MODULE_DESCRIPTION("MAX6690 sensor objects for PowerMac thermal control");