Lines Matching +full:temp +full:- +full:sensor
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Windfarm PowerMac thermal control. LM87 sensor
60 return -EIO; in wf_lm87_read_reg()
68 struct wf_lm87_sensor *lm = sr->priv; in wf_lm87_get()
69 s32 temp; in wf_lm87_get() local
71 if (lm->i2c == NULL) in wf_lm87_get()
72 return -ENODEV; in wf_lm87_get()
77 temp = wf_lm87_read_reg(lm->i2c, LM87_INT_TEMP); in wf_lm87_get()
78 if (temp < 0) in wf_lm87_get()
79 return temp; in wf_lm87_get()
80 *value = temp << 16; in wf_lm87_get()
108 * care about the internal temperature sensor in wf_lm87_probe()
110 for_each_child_of_node(client->dev.of_node, np) { in wf_lm87_probe()
111 if (!of_node_name_eq(np, "int-temp")) in wf_lm87_probe()
117 name = "dimms-temp"; in wf_lm87_probe()
119 name = "between-cpus-temp"; in wf_lm87_probe()
126 pr_warn("wf_lm87: Unsupported sensor %pOF\n", in wf_lm87_probe()
127 client->dev.of_node); in wf_lm87_probe()
128 return -ENODEV; in wf_lm87_probe()
133 return -ENODEV; in wf_lm87_probe()
135 lm->i2c = client; in wf_lm87_probe()
136 lm->sens.name = name; in wf_lm87_probe()
137 lm->sens.ops = &wf_lm87_ops; in wf_lm87_probe()
138 lm->sens.priv = lm; in wf_lm87_probe()
141 rc = wf_register_sensor(&lm->sens); in wf_lm87_probe()
152 lm->i2c = NULL; in wf_lm87_remove()
154 /* release sensor */ in wf_lm87_remove()
155 wf_unregister_sensor(&lm->sens); in wf_lm87_remove()
184 return -ENODEV; in wf_lm87_sensor_init()
199 MODULE_DESCRIPTION("LM87 sensor objects for PowerMacs thermal control");